@inploi/plugin-chatbot 3.28.2 → 3.28.4
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 +7 -7
- package/dist/{chatbot-body-bed76074.cjs → chatbot-body-30a036fc.cjs} +49 -28
- package/dist/{chatbot-body-1f775f40.js → chatbot-body-51e9bd34.js} +49 -28
- package/dist/chatbot.api.d.ts +220 -22
- package/dist/chatbot.utils.d.ts +20 -2
- package/dist/components/chat-bubble.d.ts +10 -0
- package/dist/components/chat-error.d.ts +3 -0
- package/dist/components/chat-input/chat-input.address.d.ts +16 -0
- package/dist/components/chat-input/chat-input.boolean.d.ts +21 -0
- package/dist/components/chat-input/chat-input.constants.d.ts +249 -0
- package/dist/components/chat-input/chat-input.d.ts +18 -0
- package/dist/components/chat-input/chat-input.file.d.ts +18 -0
- package/dist/components/chat-input/chat-input.multiple-choice.d.ts +16 -0
- package/dist/components/chat-input/chat-input.number.d.ts +16 -0
- package/dist/components/chat-input/chat-input.phone-number.d.ts +15 -0
- package/dist/components/chat-input/chat-input.phone-number.utils.d.ts +4 -0
- package/dist/components/chat-input/chat-input.submit.d.ts +10 -0
- package/dist/components/chat-input/chat-input.text.d.ts +17 -0
- package/dist/components/chat-loading.d.ts +1 -0
- package/dist/components/chatbot-body.d.ts +8 -0
- package/dist/components/chatbot.d.ts +8 -0
- package/dist/components/conversation.d.ts +4 -0
- package/dist/components/input-error.d.ts +5 -0
- package/dist/components/loading-indicator.d.ts +2 -0
- package/dist/components/message.link.d.ts +4 -0
- package/dist/components/palette-debugger.d.ts +1 -0
- package/dist/components/send-button.d.ts +2 -0
- package/dist/components/skip-button.d.ts +2 -0
- package/dist/components/status-bar.d.ts +4 -0
- package/dist/components/transition.d.ts +1 -0
- package/dist/components/typing-indicator.d.ts +2 -0
- package/dist/components/useChatService.d.ts +14 -0
- package/dist/components/useFocus.d.ts +1 -0
- package/dist/{index-8f799f13.cjs → index-251fe248.cjs} +1 -1
- package/dist/{index-5230f617.js → index-5e2a3998.js} +1 -1
- package/dist/mocks/browser.d.ts +1 -0
- package/dist/mocks/flows.mocks.d.ts +71 -0
- package/dist/mocks/handlers.d.ts +14 -0
- package/dist/mocks/mocks.utils.d.ts +2 -0
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/dist/style/theme.d.ts +2 -0
- package/dist/style/theme.utils.d.ts +5 -0
- package/dist/style/tokens.d.ts +88 -0
- package/package.json +2 -2
package/dist/chatbot.api.d.ts
CHANGED
|
@@ -155,11 +155,29 @@ export declare const FlowSchema: import("valibot").ObjectSchema<{
|
|
|
155
155
|
isHead?: boolean | undefined;
|
|
156
156
|
nextId?: string | undefined;
|
|
157
157
|
} | {
|
|
158
|
-
data: {
|
|
158
|
+
data: ({
|
|
159
159
|
compareKey: string;
|
|
160
160
|
compareValue: string;
|
|
161
161
|
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
162
|
-
}
|
|
162
|
+
} | {
|
|
163
|
+
combinator: "and" | "or";
|
|
164
|
+
conditions: {
|
|
165
|
+
compareKey: string;
|
|
166
|
+
compareValue: string;
|
|
167
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
168
|
+
}[];
|
|
169
|
+
}) & ({
|
|
170
|
+
compareKey: string;
|
|
171
|
+
compareValue: string;
|
|
172
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
173
|
+
} | {
|
|
174
|
+
combinator: "and" | "or";
|
|
175
|
+
conditions: {
|
|
176
|
+
compareKey: string;
|
|
177
|
+
compareValue: string;
|
|
178
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
179
|
+
}[];
|
|
180
|
+
} | undefined);
|
|
163
181
|
type: "if-block";
|
|
164
182
|
id: string;
|
|
165
183
|
isHead?: boolean | undefined;
|
|
@@ -334,11 +352,29 @@ export declare const FlowSchema: import("valibot").ObjectSchema<{
|
|
|
334
352
|
isHead?: boolean | undefined;
|
|
335
353
|
nextId?: string | undefined;
|
|
336
354
|
} | {
|
|
337
|
-
data: {
|
|
355
|
+
data: ({
|
|
338
356
|
compareKey: string;
|
|
339
357
|
compareValue: string;
|
|
340
358
|
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
341
|
-
}
|
|
359
|
+
} | {
|
|
360
|
+
combinator: "and" | "or";
|
|
361
|
+
conditions: {
|
|
362
|
+
compareKey: string;
|
|
363
|
+
compareValue: string;
|
|
364
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
365
|
+
}[];
|
|
366
|
+
}) & ({
|
|
367
|
+
compareKey: string;
|
|
368
|
+
compareValue: string;
|
|
369
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
370
|
+
} | {
|
|
371
|
+
combinator: "and" | "or";
|
|
372
|
+
conditions: {
|
|
373
|
+
compareKey: string;
|
|
374
|
+
compareValue: string;
|
|
375
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
376
|
+
}[];
|
|
377
|
+
} | undefined);
|
|
342
378
|
type: "if-block";
|
|
343
379
|
id: string;
|
|
344
380
|
isHead?: boolean | undefined;
|
|
@@ -540,11 +576,29 @@ export declare const FlowSchema: import("valibot").ObjectSchema<{
|
|
|
540
576
|
isHead?: boolean | undefined;
|
|
541
577
|
nextId?: string | undefined;
|
|
542
578
|
} | {
|
|
543
|
-
data: {
|
|
579
|
+
data: ({
|
|
544
580
|
compareKey: string;
|
|
545
581
|
compareValue: string;
|
|
546
582
|
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
547
|
-
}
|
|
583
|
+
} | {
|
|
584
|
+
combinator: "and" | "or";
|
|
585
|
+
conditions: {
|
|
586
|
+
compareKey: string;
|
|
587
|
+
compareValue: string;
|
|
588
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
589
|
+
}[];
|
|
590
|
+
}) & ({
|
|
591
|
+
compareKey: string;
|
|
592
|
+
compareValue: string;
|
|
593
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
594
|
+
} | {
|
|
595
|
+
combinator: "and" | "or";
|
|
596
|
+
conditions: {
|
|
597
|
+
compareKey: string;
|
|
598
|
+
compareValue: string;
|
|
599
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
600
|
+
}[];
|
|
601
|
+
} | undefined);
|
|
548
602
|
type: "if-block";
|
|
549
603
|
id: string;
|
|
550
604
|
isHead?: boolean | undefined;
|
|
@@ -733,11 +787,29 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
733
787
|
isHead?: boolean | undefined;
|
|
734
788
|
nextId?: string | undefined;
|
|
735
789
|
} | {
|
|
736
|
-
data: {
|
|
790
|
+
data: ({
|
|
737
791
|
compareKey: string;
|
|
738
792
|
compareValue: string;
|
|
739
793
|
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
740
|
-
}
|
|
794
|
+
} | {
|
|
795
|
+
combinator: "and" | "or";
|
|
796
|
+
conditions: {
|
|
797
|
+
compareKey: string;
|
|
798
|
+
compareValue: string;
|
|
799
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
800
|
+
}[];
|
|
801
|
+
}) & ({
|
|
802
|
+
compareKey: string;
|
|
803
|
+
compareValue: string;
|
|
804
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
805
|
+
} | {
|
|
806
|
+
combinator: "and" | "or";
|
|
807
|
+
conditions: {
|
|
808
|
+
compareKey: string;
|
|
809
|
+
compareValue: string;
|
|
810
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
811
|
+
}[];
|
|
812
|
+
} | undefined);
|
|
741
813
|
type: "if-block";
|
|
742
814
|
id: string;
|
|
743
815
|
isHead?: boolean | undefined;
|
|
@@ -912,11 +984,29 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
912
984
|
isHead?: boolean | undefined;
|
|
913
985
|
nextId?: string | undefined;
|
|
914
986
|
} | {
|
|
915
|
-
data: {
|
|
987
|
+
data: ({
|
|
916
988
|
compareKey: string;
|
|
917
989
|
compareValue: string;
|
|
918
990
|
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
919
|
-
}
|
|
991
|
+
} | {
|
|
992
|
+
combinator: "and" | "or";
|
|
993
|
+
conditions: {
|
|
994
|
+
compareKey: string;
|
|
995
|
+
compareValue: string;
|
|
996
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
997
|
+
}[];
|
|
998
|
+
}) & ({
|
|
999
|
+
compareKey: string;
|
|
1000
|
+
compareValue: string;
|
|
1001
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1002
|
+
} | {
|
|
1003
|
+
combinator: "and" | "or";
|
|
1004
|
+
conditions: {
|
|
1005
|
+
compareKey: string;
|
|
1006
|
+
compareValue: string;
|
|
1007
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1008
|
+
}[];
|
|
1009
|
+
} | undefined);
|
|
920
1010
|
type: "if-block";
|
|
921
1011
|
id: string;
|
|
922
1012
|
isHead?: boolean | undefined;
|
|
@@ -1118,11 +1208,29 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1118
1208
|
isHead?: boolean | undefined;
|
|
1119
1209
|
nextId?: string | undefined;
|
|
1120
1210
|
} | {
|
|
1121
|
-
data: {
|
|
1211
|
+
data: ({
|
|
1122
1212
|
compareKey: string;
|
|
1123
1213
|
compareValue: string;
|
|
1124
1214
|
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1125
|
-
}
|
|
1215
|
+
} | {
|
|
1216
|
+
combinator: "and" | "or";
|
|
1217
|
+
conditions: {
|
|
1218
|
+
compareKey: string;
|
|
1219
|
+
compareValue: string;
|
|
1220
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1221
|
+
}[];
|
|
1222
|
+
}) & ({
|
|
1223
|
+
compareKey: string;
|
|
1224
|
+
compareValue: string;
|
|
1225
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1226
|
+
} | {
|
|
1227
|
+
combinator: "and" | "or";
|
|
1228
|
+
conditions: {
|
|
1229
|
+
compareKey: string;
|
|
1230
|
+
compareValue: string;
|
|
1231
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1232
|
+
}[];
|
|
1233
|
+
} | undefined);
|
|
1126
1234
|
type: "if-block";
|
|
1127
1235
|
id: string;
|
|
1128
1236
|
isHead?: boolean | undefined;
|
|
@@ -1310,11 +1418,29 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1310
1418
|
isHead?: boolean | undefined;
|
|
1311
1419
|
nextId?: string | undefined;
|
|
1312
1420
|
} | {
|
|
1313
|
-
data: {
|
|
1421
|
+
data: ({
|
|
1314
1422
|
compareKey: string;
|
|
1315
1423
|
compareValue: string;
|
|
1316
1424
|
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1317
|
-
}
|
|
1425
|
+
} | {
|
|
1426
|
+
combinator: "and" | "or";
|
|
1427
|
+
conditions: {
|
|
1428
|
+
compareKey: string;
|
|
1429
|
+
compareValue: string;
|
|
1430
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1431
|
+
}[];
|
|
1432
|
+
}) & ({
|
|
1433
|
+
compareKey: string;
|
|
1434
|
+
compareValue: string;
|
|
1435
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1436
|
+
} | {
|
|
1437
|
+
combinator: "and" | "or";
|
|
1438
|
+
conditions: {
|
|
1439
|
+
compareKey: string;
|
|
1440
|
+
compareValue: string;
|
|
1441
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1442
|
+
}[];
|
|
1443
|
+
} | undefined);
|
|
1318
1444
|
type: "if-block";
|
|
1319
1445
|
id: string;
|
|
1320
1446
|
isHead?: boolean | undefined;
|
|
@@ -1508,11 +1634,29 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1508
1634
|
isHead?: boolean | undefined;
|
|
1509
1635
|
nextId?: string | undefined;
|
|
1510
1636
|
} | {
|
|
1511
|
-
data: {
|
|
1637
|
+
data: ({
|
|
1512
1638
|
compareKey: string;
|
|
1513
1639
|
compareValue: string;
|
|
1514
1640
|
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1515
|
-
}
|
|
1641
|
+
} | {
|
|
1642
|
+
combinator: "and" | "or";
|
|
1643
|
+
conditions: {
|
|
1644
|
+
compareKey: string;
|
|
1645
|
+
compareValue: string;
|
|
1646
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1647
|
+
}[];
|
|
1648
|
+
}) & ({
|
|
1649
|
+
compareKey: string;
|
|
1650
|
+
compareValue: string;
|
|
1651
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1652
|
+
} | {
|
|
1653
|
+
combinator: "and" | "or";
|
|
1654
|
+
conditions: {
|
|
1655
|
+
compareKey: string;
|
|
1656
|
+
compareValue: string;
|
|
1657
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1658
|
+
}[];
|
|
1659
|
+
} | undefined);
|
|
1516
1660
|
type: "if-block";
|
|
1517
1661
|
id: string;
|
|
1518
1662
|
isHead?: boolean | undefined;
|
|
@@ -1687,11 +1831,29 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1687
1831
|
isHead?: boolean | undefined;
|
|
1688
1832
|
nextId?: string | undefined;
|
|
1689
1833
|
} | {
|
|
1690
|
-
data: {
|
|
1834
|
+
data: ({
|
|
1691
1835
|
compareKey: string;
|
|
1692
1836
|
compareValue: string;
|
|
1693
1837
|
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1694
|
-
}
|
|
1838
|
+
} | {
|
|
1839
|
+
combinator: "and" | "or";
|
|
1840
|
+
conditions: {
|
|
1841
|
+
compareKey: string;
|
|
1842
|
+
compareValue: string;
|
|
1843
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1844
|
+
}[];
|
|
1845
|
+
}) & ({
|
|
1846
|
+
compareKey: string;
|
|
1847
|
+
compareValue: string;
|
|
1848
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1849
|
+
} | {
|
|
1850
|
+
combinator: "and" | "or";
|
|
1851
|
+
conditions: {
|
|
1852
|
+
compareKey: string;
|
|
1853
|
+
compareValue: string;
|
|
1854
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1855
|
+
}[];
|
|
1856
|
+
} | undefined);
|
|
1695
1857
|
type: "if-block";
|
|
1696
1858
|
id: string;
|
|
1697
1859
|
isHead?: boolean | undefined;
|
|
@@ -1893,11 +2055,29 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1893
2055
|
isHead?: boolean | undefined;
|
|
1894
2056
|
nextId?: string | undefined;
|
|
1895
2057
|
} | {
|
|
1896
|
-
data: {
|
|
2058
|
+
data: ({
|
|
1897
2059
|
compareKey: string;
|
|
1898
2060
|
compareValue: string;
|
|
1899
2061
|
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
1900
|
-
}
|
|
2062
|
+
} | {
|
|
2063
|
+
combinator: "and" | "or";
|
|
2064
|
+
conditions: {
|
|
2065
|
+
compareKey: string;
|
|
2066
|
+
compareValue: string;
|
|
2067
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
2068
|
+
}[];
|
|
2069
|
+
}) & ({
|
|
2070
|
+
compareKey: string;
|
|
2071
|
+
compareValue: string;
|
|
2072
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
2073
|
+
} | {
|
|
2074
|
+
combinator: "and" | "or";
|
|
2075
|
+
conditions: {
|
|
2076
|
+
compareKey: string;
|
|
2077
|
+
compareValue: string;
|
|
2078
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
2079
|
+
}[];
|
|
2080
|
+
} | undefined);
|
|
1901
2081
|
type: "if-block";
|
|
1902
2082
|
id: string;
|
|
1903
2083
|
isHead?: boolean | undefined;
|
|
@@ -2092,11 +2272,29 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
2092
2272
|
isHead?: boolean | undefined;
|
|
2093
2273
|
nextId?: string | undefined;
|
|
2094
2274
|
} | {
|
|
2095
|
-
data: {
|
|
2275
|
+
data: ({
|
|
2096
2276
|
compareKey: string;
|
|
2097
2277
|
compareValue: string;
|
|
2098
2278
|
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
2099
|
-
}
|
|
2279
|
+
} | {
|
|
2280
|
+
combinator: "and" | "or";
|
|
2281
|
+
conditions: {
|
|
2282
|
+
compareKey: string;
|
|
2283
|
+
compareValue: string;
|
|
2284
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
2285
|
+
}[];
|
|
2286
|
+
}) & ({
|
|
2287
|
+
compareKey: string;
|
|
2288
|
+
compareValue: string;
|
|
2289
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
2290
|
+
} | {
|
|
2291
|
+
combinator: "and" | "or";
|
|
2292
|
+
conditions: {
|
|
2293
|
+
compareKey: string;
|
|
2294
|
+
compareValue: string;
|
|
2295
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
2296
|
+
}[];
|
|
2297
|
+
} | undefined);
|
|
2100
2298
|
type: "if-block";
|
|
2101
2299
|
id: string;
|
|
2102
2300
|
isHead?: boolean | undefined;
|
package/dist/chatbot.utils.d.ts
CHANGED
|
@@ -146,11 +146,29 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
146
146
|
isHead?: boolean | undefined;
|
|
147
147
|
nextId?: string | undefined;
|
|
148
148
|
} | {
|
|
149
|
-
data: {
|
|
149
|
+
data: ({
|
|
150
150
|
compareKey: string;
|
|
151
151
|
compareValue: string;
|
|
152
152
|
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
153
|
-
}
|
|
153
|
+
} | {
|
|
154
|
+
combinator: "and" | "or";
|
|
155
|
+
conditions: {
|
|
156
|
+
compareKey: string;
|
|
157
|
+
compareValue: string;
|
|
158
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
159
|
+
}[];
|
|
160
|
+
}) & ({
|
|
161
|
+
compareKey: string;
|
|
162
|
+
compareValue: string;
|
|
163
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
164
|
+
} | {
|
|
165
|
+
combinator: "and" | "or";
|
|
166
|
+
conditions: {
|
|
167
|
+
compareKey: string;
|
|
168
|
+
compareValue: string;
|
|
169
|
+
compare: "equals" | "notEquals" | "contains" | "notContains" | "greaterThan" | "lessThan" | "greaterThanOrEqualTo" | "lessThanOrEqualTo";
|
|
170
|
+
}[];
|
|
171
|
+
} | undefined);
|
|
154
172
|
type: "if-block";
|
|
155
173
|
id: string;
|
|
156
174
|
isHead?: boolean | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import type { ComponentProps } from '../../node_modules/preact/compat';
|
|
3
|
+
declare const chatBubbleVariants: (props?: ({
|
|
4
|
+
side?: "left" | "right" | null | undefined;
|
|
5
|
+
animate?: boolean | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
type ChatBubbleVariants = VariantProps<typeof chatBubbleVariants>;
|
|
8
|
+
type ChatBubbleProps = ComponentProps<'p'> & ChatBubbleVariants;
|
|
9
|
+
export declare const ChatBubble: ({ children, className, animate, side, ...props }: ChatBubbleProps) => import("preact/compat").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { QuestionAddressNode } from '@inploi/core/flows';
|
|
2
|
+
import type { JSX } from 'preact';
|
|
3
|
+
import { FlowSubmissionAddress } from '../../chatbot.state';
|
|
4
|
+
import { ChatInputProps } from './chat-input';
|
|
5
|
+
export type AddressInputPayload = {
|
|
6
|
+
type: 'address';
|
|
7
|
+
/** submission id to wrap the address fields. */
|
|
8
|
+
key: string | undefined;
|
|
9
|
+
config: {
|
|
10
|
+
optional: boolean;
|
|
11
|
+
keys: QuestionAddressNode['data']['keys'];
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
};
|
|
14
|
+
submission: FlowSubmissionAddress | null;
|
|
15
|
+
};
|
|
16
|
+
export declare const ChatInputAddress: ({ input, onSubmitSuccess }: ChatInputProps<AddressInputPayload>) => JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FlowSubmissionBoolean } from '../../chatbot.state';
|
|
2
|
+
import { ChatInputProps } from './chat-input';
|
|
3
|
+
export type BooleanChoicePayload = {
|
|
4
|
+
type: 'boolean';
|
|
5
|
+
config: {
|
|
6
|
+
labels: {
|
|
7
|
+
true: string;
|
|
8
|
+
false: string;
|
|
9
|
+
};
|
|
10
|
+
optional: boolean;
|
|
11
|
+
};
|
|
12
|
+
key: string | undefined;
|
|
13
|
+
submission: FlowSubmissionBoolean | null;
|
|
14
|
+
};
|
|
15
|
+
export declare const booleanButtonListClass = "flex items-center gap-2 p-2.5";
|
|
16
|
+
export declare const BooleanOption: import("preact").FunctionalComponent<Omit<import("preact").JSX.HTMLAttributes<HTMLButtonElement> & {
|
|
17
|
+
label: string;
|
|
18
|
+
}, "ref"> & {
|
|
19
|
+
ref?: import("preact").Ref<HTMLButtonElement> | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const ChatInputBoolean: ({ input, onSubmitSuccess }: ChatInputProps<BooleanChoicePayload>) => import("preact").JSX.Element;
|