@inploi/plugin-chatbot 3.12.2 → 3.12.3
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 +8 -8
- package/dist/{chatbot-body-4233f566.cjs → chatbot-body-0265ed24.cjs} +7 -2
- package/dist/{chatbot-body-f057a7a7.js → chatbot-body-af246505.js} +7 -2
- package/dist/chatbot.api.d.ts +15 -0
- package/dist/chatbot.utils.d.ts +1 -0
- package/dist/{index-ea4e17ba.cjs → index-1d3d0226.cjs} +1 -1
- package/dist/{index-831d1492.js → index-c15669f1.js} +1 -1
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./index-
|
|
3
|
+
const index = require("./index-1d3d0226.cjs");
|
|
4
4
|
require("@inploi/sdk");
|
|
5
5
|
const followNodes = ({
|
|
6
6
|
node,
|
|
@@ -1066,6 +1066,11 @@ const validateExtensions = ({
|
|
|
1066
1066
|
const normalisedExtensions = allowedExtensions.map((ext) => ext.toLowerCase());
|
|
1067
1067
|
return files.every((file) => normalisedExtensions.includes(getFileExtension(file.name).toLowerCase()));
|
|
1068
1068
|
};
|
|
1069
|
+
const trimFileName = (fileName, maxLength) => {
|
|
1070
|
+
const extension = getFileExtension(fileName);
|
|
1071
|
+
const trimmedName = fileName.replace(new RegExp(`${extension}$`), "").slice(0, maxLength);
|
|
1072
|
+
return `${trimmedName}${extension}`;
|
|
1073
|
+
};
|
|
1069
1074
|
const ChatInputFile = ({
|
|
1070
1075
|
input,
|
|
1071
1076
|
onSubmitSuccess,
|
|
@@ -1186,7 +1191,7 @@ const ChatInputFile = ({
|
|
|
1186
1191
|
const filesToUpload = await Promise.allSettled(files2.map(async (file) => {
|
|
1187
1192
|
const data = await toBase64(file);
|
|
1188
1193
|
return {
|
|
1189
|
-
name: file.name,
|
|
1194
|
+
name: trimFileName(file.name, 42),
|
|
1190
1195
|
data,
|
|
1191
1196
|
sizeKb: file.size / 1e3
|
|
1192
1197
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _, g as getHeadOrThrow, i as invariant, A as AbortedError, N, a as getFlowSubmissionsPayload, h as hasProp, k as kbToReadableSize, o as o$1, c as clsx, b as a$2, d as _$1, y, F, s as store, p, e as parse, f as picklist, j as h, l as k, m as isSubmissionOfType, C as Cn, n as parseAsync, V as ValiError, q as object, t as transform, r as maxLength, u as minLength, v as record, w as boolean, x as string, z as email, B as url, D as regex, T, E as m, G as AnimatePresence, H as ERROR_MESSAGES } from "./index-
|
|
1
|
+
import { _, g as getHeadOrThrow, i as invariant, A as AbortedError, N, a as getFlowSubmissionsPayload, h as hasProp, k as kbToReadableSize, o as o$1, c as clsx, b as a$2, d as _$1, y, F, s as store, p, e as parse, f as picklist, j as h, l as k, m as isSubmissionOfType, C as Cn, n as parseAsync, V as ValiError, q as object, t as transform, r as maxLength, u as minLength, v as record, w as boolean, x as string, z as email, B as url, D as regex, T, E as m, G as AnimatePresence, H as ERROR_MESSAGES } from "./index-c15669f1.js";
|
|
2
2
|
import "@inploi/sdk";
|
|
3
3
|
const followNodes = ({
|
|
4
4
|
node,
|
|
@@ -1064,6 +1064,11 @@ const validateExtensions = ({
|
|
|
1064
1064
|
const normalisedExtensions = allowedExtensions.map((ext) => ext.toLowerCase());
|
|
1065
1065
|
return files.every((file) => normalisedExtensions.includes(getFileExtension(file.name).toLowerCase()));
|
|
1066
1066
|
};
|
|
1067
|
+
const trimFileName = (fileName, maxLength2) => {
|
|
1068
|
+
const extension = getFileExtension(fileName);
|
|
1069
|
+
const trimmedName = fileName.replace(new RegExp(`${extension}$`), "").slice(0, maxLength2);
|
|
1070
|
+
return `${trimmedName}${extension}`;
|
|
1071
|
+
};
|
|
1067
1072
|
const ChatInputFile = ({
|
|
1068
1073
|
input,
|
|
1069
1074
|
onSubmitSuccess,
|
|
@@ -1184,7 +1189,7 @@ const ChatInputFile = ({
|
|
|
1184
1189
|
const filesToUpload = await Promise.allSettled(files2.map(async (file) => {
|
|
1185
1190
|
const data = await toBase64(file);
|
|
1186
1191
|
return {
|
|
1187
|
-
name: file.name,
|
|
1192
|
+
name: trimFileName(file.name, 42),
|
|
1188
1193
|
data,
|
|
1189
1194
|
sizeKb: file.size / 1e3
|
|
1190
1195
|
};
|
package/dist/chatbot.api.d.ts
CHANGED
|
@@ -87,6 +87,7 @@ export declare const FlowSchema: import("valibot").ObjectSchema<{
|
|
|
87
87
|
optional: boolean;
|
|
88
88
|
format: "text" | "url" | "email" | "phone";
|
|
89
89
|
placeholder?: string | undefined;
|
|
90
|
+
maxChars?: number | undefined;
|
|
90
91
|
};
|
|
91
92
|
type: "question-text";
|
|
92
93
|
isHead?: boolean | undefined;
|
|
@@ -243,6 +244,7 @@ export declare const FlowSchema: import("valibot").ObjectSchema<{
|
|
|
243
244
|
optional: boolean;
|
|
244
245
|
format: "text" | "url" | "email" | "phone";
|
|
245
246
|
placeholder?: string | undefined;
|
|
247
|
+
maxChars?: number | undefined;
|
|
246
248
|
};
|
|
247
249
|
type: "question-text";
|
|
248
250
|
isHead?: boolean | undefined;
|
|
@@ -403,6 +405,7 @@ export declare const FlowSchema: import("valibot").ObjectSchema<{
|
|
|
403
405
|
optional: boolean;
|
|
404
406
|
format: "text" | "url" | "email" | "phone";
|
|
405
407
|
placeholder?: string | undefined;
|
|
408
|
+
maxChars?: number | undefined;
|
|
406
409
|
};
|
|
407
410
|
type: "question-text";
|
|
408
411
|
isHead?: boolean | undefined;
|
|
@@ -565,6 +568,7 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
565
568
|
optional: boolean;
|
|
566
569
|
format: "text" | "url" | "email" | "phone";
|
|
567
570
|
placeholder?: string | undefined;
|
|
571
|
+
maxChars?: number | undefined;
|
|
568
572
|
};
|
|
569
573
|
type: "question-text";
|
|
570
574
|
isHead?: boolean | undefined;
|
|
@@ -721,6 +725,7 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
721
725
|
optional: boolean;
|
|
722
726
|
format: "text" | "url" | "email" | "phone";
|
|
723
727
|
placeholder?: string | undefined;
|
|
728
|
+
maxChars?: number | undefined;
|
|
724
729
|
};
|
|
725
730
|
type: "question-text";
|
|
726
731
|
isHead?: boolean | undefined;
|
|
@@ -881,6 +886,7 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
881
886
|
optional: boolean;
|
|
882
887
|
format: "text" | "url" | "email" | "phone";
|
|
883
888
|
placeholder?: string | undefined;
|
|
889
|
+
maxChars?: number | undefined;
|
|
884
890
|
};
|
|
885
891
|
type: "question-text";
|
|
886
892
|
isHead?: boolean | undefined;
|
|
@@ -1043,6 +1049,7 @@ export declare const FlowByIdPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1043
1049
|
optional: boolean;
|
|
1044
1050
|
format: "text" | "url" | "email" | "phone";
|
|
1045
1051
|
placeholder?: string | undefined;
|
|
1052
|
+
maxChars?: number | undefined;
|
|
1046
1053
|
};
|
|
1047
1054
|
type: "question-text";
|
|
1048
1055
|
isHead?: boolean | undefined;
|
|
@@ -1211,6 +1218,7 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1211
1218
|
optional: boolean;
|
|
1212
1219
|
format: "text" | "url" | "email" | "phone";
|
|
1213
1220
|
placeholder?: string | undefined;
|
|
1221
|
+
maxChars?: number | undefined;
|
|
1214
1222
|
};
|
|
1215
1223
|
type: "question-text";
|
|
1216
1224
|
isHead?: boolean | undefined;
|
|
@@ -1367,6 +1375,7 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1367
1375
|
optional: boolean;
|
|
1368
1376
|
format: "text" | "url" | "email" | "phone";
|
|
1369
1377
|
placeholder?: string | undefined;
|
|
1378
|
+
maxChars?: number | undefined;
|
|
1370
1379
|
};
|
|
1371
1380
|
type: "question-text";
|
|
1372
1381
|
isHead?: boolean | undefined;
|
|
@@ -1527,6 +1536,7 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1527
1536
|
optional: boolean;
|
|
1528
1537
|
format: "text" | "url" | "email" | "phone";
|
|
1529
1538
|
placeholder?: string | undefined;
|
|
1539
|
+
maxChars?: number | undefined;
|
|
1530
1540
|
};
|
|
1531
1541
|
type: "question-text";
|
|
1532
1542
|
isHead?: boolean | undefined;
|
|
@@ -1696,6 +1706,7 @@ export declare const FlowByJobPayloadSchema: import("valibot").ObjectSchema<{
|
|
|
1696
1706
|
optional: boolean;
|
|
1697
1707
|
format: "text" | "url" | "email" | "phone";
|
|
1698
1708
|
placeholder?: string | undefined;
|
|
1709
|
+
maxChars?: number | undefined;
|
|
1699
1710
|
};
|
|
1700
1711
|
type: "question-text";
|
|
1701
1712
|
isHead?: boolean | undefined;
|
|
@@ -1866,6 +1877,7 @@ export declare const StartFlowSchema: import("valibot").ObjectSchema<{
|
|
|
1866
1877
|
optional: boolean;
|
|
1867
1878
|
format: "text" | "url" | "email" | "phone";
|
|
1868
1879
|
placeholder?: string | undefined;
|
|
1880
|
+
maxChars?: number | undefined;
|
|
1869
1881
|
};
|
|
1870
1882
|
type: "question-text";
|
|
1871
1883
|
isHead?: boolean | undefined;
|
|
@@ -2022,6 +2034,7 @@ export declare const StartFlowSchema: import("valibot").ObjectSchema<{
|
|
|
2022
2034
|
optional: boolean;
|
|
2023
2035
|
format: "text" | "url" | "email" | "phone";
|
|
2024
2036
|
placeholder?: string | undefined;
|
|
2037
|
+
maxChars?: number | undefined;
|
|
2025
2038
|
};
|
|
2026
2039
|
type: "question-text";
|
|
2027
2040
|
isHead?: boolean | undefined;
|
|
@@ -2182,6 +2195,7 @@ export declare const StartFlowSchema: import("valibot").ObjectSchema<{
|
|
|
2182
2195
|
optional: boolean;
|
|
2183
2196
|
format: "text" | "url" | "email" | "phone";
|
|
2184
2197
|
placeholder?: string | undefined;
|
|
2198
|
+
maxChars?: number | undefined;
|
|
2185
2199
|
};
|
|
2186
2200
|
type: "question-text";
|
|
2187
2201
|
isHead?: boolean | undefined;
|
|
@@ -2349,6 +2363,7 @@ export declare const StartFlowSchema: import("valibot").ObjectSchema<{
|
|
|
2349
2363
|
optional: boolean;
|
|
2350
2364
|
format: "text" | "url" | "email" | "phone";
|
|
2351
2365
|
placeholder?: string | undefined;
|
|
2366
|
+
maxChars?: number | undefined;
|
|
2352
2367
|
};
|
|
2353
2368
|
type: "question-text";
|
|
2354
2369
|
isHead?: boolean | undefined;
|
package/dist/chatbot.utils.d.ts
CHANGED
|
@@ -74,6 +74,7 @@ export declare const getHeadOrThrow: (nodes: FlowNode[]) => {
|
|
|
74
74
|
optional: boolean;
|
|
75
75
|
format: "text" | "url" | "email" | "phone";
|
|
76
76
|
placeholder?: string | undefined;
|
|
77
|
+
maxChars?: number | undefined;
|
|
77
78
|
};
|
|
78
79
|
type: "question-text";
|
|
79
80
|
isHead?: boolean | undefined;
|
|
@@ -9100,7 +9100,7 @@ const StatusBar = ({
|
|
|
9100
9100
|
})
|
|
9101
9101
|
});
|
|
9102
9102
|
};
|
|
9103
|
-
const ChatbotBody = M(() => Promise.resolve().then(() => require("./chatbot-body-
|
|
9103
|
+
const ChatbotBody = M(() => Promise.resolve().then(() => require("./chatbot-body-0265ed24.cjs")).then((module2) => module2.ChatbotBody));
|
|
9104
9104
|
const MotionProvider = ({
|
|
9105
9105
|
children
|
|
9106
9106
|
}) => {
|
|
@@ -9099,7 +9099,7 @@ const StatusBar = ({
|
|
|
9099
9099
|
})
|
|
9100
9100
|
});
|
|
9101
9101
|
};
|
|
9102
|
-
const ChatbotBody = M(() => import("./chatbot-body-
|
|
9102
|
+
const ChatbotBody = M(() => import("./chatbot-body-af246505.js").then((module) => module.ChatbotBody));
|
|
9103
9103
|
const MotionProvider = ({
|
|
9104
9104
|
children
|
|
9105
9105
|
}) => {
|
package/dist/plugin-chatbot.cjs
CHANGED
package/dist/plugin-chatbot.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inploi/plugin-chatbot",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/plugin-chatbot.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"vite": "^4.4.5",
|
|
66
66
|
"vite-plugin-dts": "^3.7.0",
|
|
67
67
|
"vite-tsconfig-paths": "^4.2.1",
|
|
68
|
-
"@inploi/core": "1.11.
|
|
68
|
+
"@inploi/core": "1.11.8",
|
|
69
69
|
"@inploi/design-tokens": "0.2.1",
|
|
70
70
|
"@inploi/sdk": "1.12.2",
|
|
71
71
|
"eslint-config-custom": "0.1.0",
|