@inploi/plugin-chatbot 3.4.1 → 3.5.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 +10 -10
- package/dist/{index-cd323c8f.cjs → index-430323a2.cjs} +1 -1
- package/dist/{index-e2bcee62.js → index-670c0945.js} +1 -1
- package/dist/{job-application-content-df993dbc.js → job-application-content-8a7522d6.js} +19 -3
- package/dist/{job-application-content-1005e99a.cjs → job-application-content-a6726978.cjs} +19 -3
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/package.json +2 -2
|
@@ -8298,7 +8298,7 @@ const ChatbotHeader = ({
|
|
|
8298
8298
|
})]
|
|
8299
8299
|
});
|
|
8300
8300
|
};
|
|
8301
|
-
const JobApplicationContent = M$1(() => Promise.resolve().then(() => require("./job-application-content-
|
|
8301
|
+
const JobApplicationContent = M$1(() => Promise.resolve().then(() => require("./job-application-content-a6726978.cjs")).then((module2) => module2.JobApplicationContent));
|
|
8302
8302
|
const MotionProvider = ({
|
|
8303
8303
|
children
|
|
8304
8304
|
}) => {
|
|
@@ -8297,7 +8297,7 @@ const ChatbotHeader = ({
|
|
|
8297
8297
|
})]
|
|
8298
8298
|
});
|
|
8299
8299
|
};
|
|
8300
|
-
const JobApplicationContent = M$1(() => import("./job-application-content-
|
|
8300
|
+
const JobApplicationContent = M$1(() => import("./job-application-content-8a7522d6.js").then((module) => module.JobApplicationContent));
|
|
8301
8301
|
const MotionProvider = ({
|
|
8302
8302
|
children
|
|
8303
8303
|
}) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _, g as getHeadOrThrow, A as AbortedError, N, a as getApplicationSubmissionsPayload, o as o$1, c as clsx, b as _$1, p, d as parse, e as picklist, m, f as AnimatePresence, h as application, i as h, k, j as invariant, l as isSubmissionOfType, C as Cn, n as parseAsync, V as ValiError, q as object, t as transform, r as maxLength, s as minLength, u as record, v as boolean, w as string, x as email, y as url, z as regex, B as y, T, D as inputHeight, F, E as viewState, G as ERROR_MESSAGES } from "./index-
|
|
1
|
+
import { _, g as getHeadOrThrow, A as AbortedError, N, a as getApplicationSubmissionsPayload, o as o$1, c as clsx, b as _$1, p, d as parse, e as picklist, m, f as AnimatePresence, h as application, i as h, k, j as invariant, l as isSubmissionOfType, C as Cn, n as parseAsync, V as ValiError, q as object, t as transform, r as maxLength, s as minLength, u as record, v as boolean, w as string, x as email, y as url, z as regex, B as y, T, D as inputHeight, F, E as viewState, G as ERROR_MESSAGES } from "./index-670c0945.js";
|
|
2
2
|
import "@inploi/sdk";
|
|
3
3
|
const followNodes = ({
|
|
4
4
|
node,
|
|
@@ -82,7 +82,8 @@ const createFlowInterpreter = ({
|
|
|
82
82
|
if (!nextNode)
|
|
83
83
|
return onFlowEnd == null ? void 0 : onFlowEnd(node);
|
|
84
84
|
return interpretNode(nextNode, node);
|
|
85
|
-
}
|
|
85
|
+
},
|
|
86
|
+
end: () => onFlowEnd == null ? void 0 : onFlowEnd(node)
|
|
86
87
|
});
|
|
87
88
|
} catch (e) {
|
|
88
89
|
if (e instanceof AbortedError)
|
|
@@ -184,6 +185,17 @@ async function interpretSubmitNode({
|
|
|
184
185
|
minSelected: 1
|
|
185
186
|
}
|
|
186
187
|
});
|
|
188
|
+
const logApplyComplete = () => {
|
|
189
|
+
const contextJobId = typeof context.jobId === "string" ? context.jobId : void 0;
|
|
190
|
+
if (contextJobId) {
|
|
191
|
+
analytics.log({
|
|
192
|
+
event: "APPLY_COMPLETE",
|
|
193
|
+
properties: {
|
|
194
|
+
job_id: contextJobId
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
};
|
|
187
199
|
await chat.sendMessage({
|
|
188
200
|
type: "system",
|
|
189
201
|
variant: "info",
|
|
@@ -214,6 +226,7 @@ async function interpretSubmitNode({
|
|
|
214
226
|
if (currentAnonymousId && !href.searchParams.has("anonymous_id")) {
|
|
215
227
|
href.searchParams.set("anonymous_id", currentAnonymousId);
|
|
216
228
|
}
|
|
229
|
+
logApplyComplete();
|
|
217
230
|
await chat.sendMessage({
|
|
218
231
|
type: "link",
|
|
219
232
|
href: href.toString(),
|
|
@@ -222,6 +235,7 @@ async function interpretSubmitNode({
|
|
|
222
235
|
}).with({
|
|
223
236
|
success: true
|
|
224
237
|
}, async () => {
|
|
238
|
+
logApplyComplete();
|
|
225
239
|
await chat.sendMessage({
|
|
226
240
|
type: "system",
|
|
227
241
|
variant: "success",
|
|
@@ -431,6 +445,7 @@ async function interpretQuestionFileNode({
|
|
|
431
445
|
}
|
|
432
446
|
async function interpretEndFlowNode({
|
|
433
447
|
chat,
|
|
448
|
+
end,
|
|
434
449
|
next,
|
|
435
450
|
node
|
|
436
451
|
}) {
|
|
@@ -439,7 +454,7 @@ async function interpretEndFlowNode({
|
|
|
439
454
|
variant: "info",
|
|
440
455
|
text: node.data.systemMessage || "Conversation finished"
|
|
441
456
|
});
|
|
442
|
-
|
|
457
|
+
end();
|
|
443
458
|
}
|
|
444
459
|
const stringOrStringArray = _.union(_.string, _.array(_.string));
|
|
445
460
|
const isIfBlockConditionMet = (ifBlock, submissions) => {
|
|
@@ -2636,6 +2651,7 @@ const TypingIndicator = ({
|
|
|
2636
2651
|
...props
|
|
2637
2652
|
}) => {
|
|
2638
2653
|
return o$1("div", {
|
|
2654
|
+
"aria-label": "Typing…",
|
|
2639
2655
|
class: clsx("flex gap-1 p-4", className),
|
|
2640
2656
|
...props,
|
|
2641
2657
|
children: Array.from({
|
|
@@ -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-430323a2.cjs");
|
|
4
4
|
require("@inploi/sdk");
|
|
5
5
|
const followNodes = ({
|
|
6
6
|
node,
|
|
@@ -84,7 +84,8 @@ const createFlowInterpreter = ({
|
|
|
84
84
|
if (!nextNode)
|
|
85
85
|
return onFlowEnd == null ? void 0 : onFlowEnd(node);
|
|
86
86
|
return interpretNode(nextNode, node);
|
|
87
|
-
}
|
|
87
|
+
},
|
|
88
|
+
end: () => onFlowEnd == null ? void 0 : onFlowEnd(node)
|
|
88
89
|
});
|
|
89
90
|
} catch (e) {
|
|
90
91
|
if (e instanceof index.AbortedError)
|
|
@@ -186,6 +187,17 @@ async function interpretSubmitNode({
|
|
|
186
187
|
minSelected: 1
|
|
187
188
|
}
|
|
188
189
|
});
|
|
190
|
+
const logApplyComplete = () => {
|
|
191
|
+
const contextJobId = typeof context.jobId === "string" ? context.jobId : void 0;
|
|
192
|
+
if (contextJobId) {
|
|
193
|
+
analytics.log({
|
|
194
|
+
event: "APPLY_COMPLETE",
|
|
195
|
+
properties: {
|
|
196
|
+
job_id: contextJobId
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
};
|
|
189
201
|
await chat.sendMessage({
|
|
190
202
|
type: "system",
|
|
191
203
|
variant: "info",
|
|
@@ -216,6 +228,7 @@ async function interpretSubmitNode({
|
|
|
216
228
|
if (currentAnonymousId && !href.searchParams.has("anonymous_id")) {
|
|
217
229
|
href.searchParams.set("anonymous_id", currentAnonymousId);
|
|
218
230
|
}
|
|
231
|
+
logApplyComplete();
|
|
219
232
|
await chat.sendMessage({
|
|
220
233
|
type: "link",
|
|
221
234
|
href: href.toString(),
|
|
@@ -224,6 +237,7 @@ async function interpretSubmitNode({
|
|
|
224
237
|
}).with({
|
|
225
238
|
success: true
|
|
226
239
|
}, async () => {
|
|
240
|
+
logApplyComplete();
|
|
227
241
|
await chat.sendMessage({
|
|
228
242
|
type: "system",
|
|
229
243
|
variant: "success",
|
|
@@ -433,6 +447,7 @@ async function interpretQuestionFileNode({
|
|
|
433
447
|
}
|
|
434
448
|
async function interpretEndFlowNode({
|
|
435
449
|
chat,
|
|
450
|
+
end,
|
|
436
451
|
next,
|
|
437
452
|
node
|
|
438
453
|
}) {
|
|
@@ -441,7 +456,7 @@ async function interpretEndFlowNode({
|
|
|
441
456
|
variant: "info",
|
|
442
457
|
text: node.data.systemMessage || "Conversation finished"
|
|
443
458
|
});
|
|
444
|
-
|
|
459
|
+
end();
|
|
445
460
|
}
|
|
446
461
|
const stringOrStringArray = index._.union(index._.string, index._.array(index._.string));
|
|
447
462
|
const isIfBlockConditionMet = (ifBlock, submissions) => {
|
|
@@ -2638,6 +2653,7 @@ const TypingIndicator = ({
|
|
|
2638
2653
|
...props
|
|
2639
2654
|
}) => {
|
|
2640
2655
|
return index.o("div", {
|
|
2656
|
+
"aria-label": "Typing…",
|
|
2641
2657
|
class: index.clsx("flex gap-1 p-4", className),
|
|
2642
2658
|
...props,
|
|
2643
2659
|
children: Array.from({
|
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.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/plugin-chatbot.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"vite": "^4.4.5",
|
|
64
64
|
"vite-plugin-dts": "^3.7.0",
|
|
65
65
|
"vite-tsconfig-paths": "^4.2.1",
|
|
66
|
-
"@inploi/core": "1.11.
|
|
66
|
+
"@inploi/core": "1.11.1",
|
|
67
67
|
"@inploi/sdk": "1.10.0",
|
|
68
68
|
"eslint-config-custom": "0.1.0",
|
|
69
69
|
"tsconfig": "0.1.0"
|