@datatechsolutions/ui 2.11.74 → 2.11.76
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/dist/astrlabe/index.js +150 -150
- package/dist/astrlabe/index.mjs +6 -6
- package/dist/astrlabe/workflow-canvas.js +4 -4
- package/dist/astrlabe/workflow-canvas.mjs +3 -3
- package/dist/{chunk-PRCRY6MW.js → chunk-EAGAWIIC.js} +64 -64
- package/dist/{chunk-PRCRY6MW.js.map → chunk-EAGAWIIC.js.map} +1 -1
- package/dist/{chunk-HLFZARBM.mjs → chunk-JIQSAUYC.mjs} +3 -3
- package/dist/{chunk-HLFZARBM.mjs.map → chunk-JIQSAUYC.mjs.map} +1 -1
- package/dist/{chunk-NIGFMRWC.js → chunk-KNXAOJAK.js} +189 -26
- package/dist/chunk-KNXAOJAK.js.map +1 -0
- package/dist/{chunk-JV4V2FJP.mjs → chunk-ZJQ5RLGK.mjs} +189 -26
- package/dist/chunk-ZJQ5RLGK.mjs.map +1 -0
- package/dist/index.d.mts +32 -3
- package/dist/index.d.ts +32 -3
- package/dist/index.js +753 -753
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-JV4V2FJP.mjs.map +0 -1
- package/dist/chunk-NIGFMRWC.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var chunkUZ3CMNUJ_js = require('./chunk-UZ3CMNUJ.js');
|
|
4
5
|
var chunkYXN2K77G_js = require('./chunk-YXN2K77G.js');
|
|
5
6
|
var chunkS7KHTUHA_js = require('./chunk-S7KHTUHA.js');
|
|
6
|
-
var chunkUZ3CMNUJ_js = require('./chunk-UZ3CMNUJ.js');
|
|
7
7
|
var Headless6 = require('@headlessui/react');
|
|
8
8
|
var clsx = require('clsx');
|
|
9
9
|
var React12 = require('react');
|
|
@@ -16464,10 +16464,11 @@ function DepartmentWorkflowDemo({
|
|
|
16464
16464
|
hideHeader = false,
|
|
16465
16465
|
onComplete,
|
|
16466
16466
|
theme,
|
|
16467
|
-
nodeAvatars
|
|
16467
|
+
nodeAvatars,
|
|
16468
|
+
onStepChange
|
|
16468
16469
|
}) {
|
|
16469
16470
|
const t = { ...DEFAULT_THEME, ...theme };
|
|
16470
|
-
const { graph, steps, title, description, accentBadge, completionSummary } = workflow;
|
|
16471
|
+
const { graph, steps, title, description, accentBadge, completionSummary, nodeSubtitles } = workflow;
|
|
16471
16472
|
const [stepIndex, setStepIndex] = React12.useState(-1);
|
|
16472
16473
|
const intervalRef = React12.useRef(null);
|
|
16473
16474
|
const completedRef = React12.useRef(false);
|
|
@@ -16538,6 +16539,11 @@ function DepartmentWorkflowDemo({
|
|
|
16538
16539
|
if (intervalRef.current) clearInterval(intervalRef.current);
|
|
16539
16540
|
};
|
|
16540
16541
|
}, [autoPlay, handleRun]);
|
|
16542
|
+
React12.useEffect(() => {
|
|
16543
|
+
if (stepIndex >= 0 && onStepChange) {
|
|
16544
|
+
onStepChange(stepIndex, steps[stepIndex]?.label ?? "");
|
|
16545
|
+
}
|
|
16546
|
+
}, [stepIndex, steps, onStepChange]);
|
|
16541
16547
|
const currentStepLabel = stepIndex >= 0 ? steps[stepIndex]?.label : "Ready to run";
|
|
16542
16548
|
const Shell = hideHeader ? ({ children: c }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: c }) : ({ children: c }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: `liquid-surface rounded-2xl overflow-hidden ${className ?? ""}`, children: c });
|
|
16543
16549
|
return /* @__PURE__ */ jsxRuntime.jsxs(Shell, { children: [
|
|
@@ -16605,14 +16611,14 @@ function DepartmentWorkflowDemo({
|
|
|
16605
16611
|
const isStepDone = stepIndex > col.stepIndex;
|
|
16606
16612
|
const showsConnector = colIdx > 0;
|
|
16607
16613
|
const isParallel = col.nodes.length > 1;
|
|
16608
|
-
const nodeWidth = isParallel ? "w-[
|
|
16614
|
+
const nodeWidth = isParallel ? "w-[160px]" : "w-[180px]";
|
|
16609
16615
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-0", children: [
|
|
16610
|
-
showsConnector && /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "
|
|
16616
|
+
showsConnector && /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "28", height: "2", className: "mx-1 shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
16611
16617
|
"line",
|
|
16612
16618
|
{
|
|
16613
16619
|
x1: "0",
|
|
16614
16620
|
y1: "1",
|
|
16615
|
-
x2: "
|
|
16621
|
+
x2: "28",
|
|
16616
16622
|
y2: "1",
|
|
16617
16623
|
stroke: isStepDone ? t.completeEdgeStroke : isStepActive ? t.activeEdgeStroke : "#334155",
|
|
16618
16624
|
strokeWidth: "2",
|
|
@@ -16624,6 +16630,7 @@ function DepartmentWorkflowDemo({
|
|
|
16624
16630
|
const status = getStatus(node2);
|
|
16625
16631
|
const meta = getNodeMeta(node2.type);
|
|
16626
16632
|
const avatar = nodeAvatars?.[node2.id];
|
|
16633
|
+
const subtitle = nodeSubtitles?.[node2.id] ?? meta.tag;
|
|
16627
16634
|
const statusClass = status === "running" ? `scale-[1.03] ring-2 ${t.activeRing}` : status === "complete" ? "ring-1 ring-emerald-500/40" : "opacity-50";
|
|
16628
16635
|
const tagBadge = meta.tag === "agent" || meta.tag === "agent.tool" ? "bg-purple-500/20 text-purple-700 dark:text-purple-300" : meta.tag === "datasource" || meta.tag === "kb" || meta.tag === "entity" ? "bg-sky-500/20 text-sky-700 dark:text-sky-300" : meta.tag === "http" ? "bg-cyan-500/20 text-cyan-700 dark:text-cyan-300" : meta.tag === "code" || meta.tag === "template" ? "bg-amber-500/20 text-amber-700 dark:text-amber-300" : meta.tag === "branch" || meta.tag === "classifier" ? "bg-orange-500/20 text-orange-700 dark:text-orange-300" : meta.tag === "aggregate" || meta.tag === "assign" ? "bg-yellow-500/20 text-yellow-700 dark:text-yellow-300" : meta.tag === "iterate" || meta.tag === "list" ? "bg-fuchsia-500/20 text-fuchsia-700 dark:text-fuchsia-300" : meta.tag === "dashboard" || meta.tag === "answer" || meta.tag === "start" || meta.tag === "end" ? "bg-emerald-500/20 text-emerald-700 dark:text-emerald-300" : "bg-slate-500/20 text-slate-700 dark:text-slate-300";
|
|
16629
16636
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -16643,7 +16650,7 @@ function DepartmentWorkflowDemo({
|
|
|
16643
16650
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-9 w-9 shrink-0 items-center justify-center rounded-xl ${meta.bg}`, children: /* @__PURE__ */ jsxRuntime.jsx(meta.icon, { className: `h-5 w-5 ${meta.color}` }) }),
|
|
16644
16651
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
16645
16652
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate text-[12px] font-semibold leading-tight text-gray-900 dark:text-white", children: node2.data.label }),
|
|
16646
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "
|
|
16653
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "line-clamp-2 text-[9.5px] text-gray-500 dark:text-gray-400 mt-0.5 leading-snug", children: subtitle })
|
|
16647
16654
|
] }),
|
|
16648
16655
|
status === "complete" && /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.CheckCircleIcon, { className: "h-4 w-4 shrink-0 text-emerald-500" })
|
|
16649
16656
|
] }),
|
|
@@ -16687,6 +16694,16 @@ var financialWorkflow = {
|
|
|
16687
16694
|
description: "Q4 close \u2014 aggregate transactions, compute Brazilian taxes in parallel, audit for compliance, publish report.",
|
|
16688
16695
|
accentBadge: "bg-emerald-500/15 text-emerald-300",
|
|
16689
16696
|
completionSummary: "Quarterly report published \xB7 R$ 387k taxes calculated \xB7 0 compliance violations",
|
|
16697
|
+
nodeSubtitles: {
|
|
16698
|
+
start: "Trigger Q4",
|
|
16699
|
+
"fetch-tx": "Aurora \xB7 12k linhas",
|
|
16700
|
+
icms: "estadual",
|
|
16701
|
+
"pis-cofins": "federal",
|
|
16702
|
+
iss: "municipal",
|
|
16703
|
+
aggregate: "3 fontes \u2192 consolidado",
|
|
16704
|
+
audit: "Carlos \xB7 regras Receita",
|
|
16705
|
+
report: "PDF + dashboard"
|
|
16706
|
+
},
|
|
16690
16707
|
graph: buildGraph(
|
|
16691
16708
|
[
|
|
16692
16709
|
node("start", "start", "Trigger Q4 close", 0, 120),
|
|
@@ -16724,6 +16741,17 @@ var salesWorkflow = {
|
|
|
16724
16741
|
description: "Lead arrives \u2192 agents score, qualify, draft proposal, and drive negotiation to close.",
|
|
16725
16742
|
accentBadge: "bg-blue-500/15 text-blue-300",
|
|
16726
16743
|
completionSummary: "Deal closed \xB7 R$ 45k/m\xEAs \xB7 14-day cycle \xB7 Score 85/100",
|
|
16744
|
+
nodeSubtitles: {
|
|
16745
|
+
start: "XPTO Ltda",
|
|
16746
|
+
intake: "CRM \xB7 enriquecimento",
|
|
16747
|
+
score: "modelo \xB7 0-100",
|
|
16748
|
+
gate: "fork \xB7 \u226580",
|
|
16749
|
+
qualify: "Beatriz \xB7 SQL/MQL",
|
|
16750
|
+
nurture: "fila de nutri\xE7\xE3o",
|
|
16751
|
+
proposal: "CPQ \xB7 template",
|
|
16752
|
+
negotiate: "Beatriz \xB7 desconto",
|
|
16753
|
+
close: "fatura \xB7 CRM"
|
|
16754
|
+
},
|
|
16727
16755
|
graph: buildGraph(
|
|
16728
16756
|
[
|
|
16729
16757
|
node("start", "start", "New lead (XPTO)", 0, 120),
|
|
@@ -16763,6 +16791,17 @@ var marketingWorkflow = {
|
|
|
16763
16791
|
description: "Brief \u2192 parallel design, copy, audience \u2192 assemble \u2192 schedule \u2192 ship \u2192 measure.",
|
|
16764
16792
|
accentBadge: "bg-pink-500/15 text-pink-300",
|
|
16765
16793
|
completionSummary: "Campaign shipped \xB7 142k emails \xB7 6.8% CTR \xB7 +18% ROAS vs. target",
|
|
16794
|
+
nodeSubtitles: {
|
|
16795
|
+
start: "brief recebido",
|
|
16796
|
+
strategist: "decompor objetivos",
|
|
16797
|
+
design: "creative \xB7 4 pe\xE7as",
|
|
16798
|
+
copy: "headline \xB7 CTA",
|
|
16799
|
+
audience: "segmenta\xE7\xE3o \xB7 142k",
|
|
16800
|
+
assemble: "pacote final",
|
|
16801
|
+
schedule: "janela ideal",
|
|
16802
|
+
send: "SES \xB7 142k disparos",
|
|
16803
|
+
metrics: "CTR \xB7 ROAS \xB7 conv"
|
|
16804
|
+
},
|
|
16766
16805
|
graph: buildGraph(
|
|
16767
16806
|
[
|
|
16768
16807
|
node("start", "start", "Campaign brief", 0, 120),
|
|
@@ -16803,6 +16842,16 @@ var inventoryWorkflow = {
|
|
|
16803
16842
|
description: "Read stock \u2192 forecast demand \u2192 filter low-stock SKUs \u2192 iterate orders \u2192 publish report.",
|
|
16804
16843
|
accentBadge: "bg-orange-500/15 text-orange-300",
|
|
16805
16844
|
completionSummary: "12 SKUs reordered \xB7 R$ 84k committed \xB7 projected stockout avoided",
|
|
16845
|
+
nodeSubtitles: {
|
|
16846
|
+
start: "cron di\xE1rio 06:00",
|
|
16847
|
+
stock: "1.847 SKUs \xB7 ABC",
|
|
16848
|
+
forecast: "Paulo \xB7 sazonalidade",
|
|
16849
|
+
filter: "abaixo do m\xEDn",
|
|
16850
|
+
loop: "por SKU \xB7 12 itens",
|
|
16851
|
+
supplier: "cota\xE7\xE3o \xB7 3 fornec",
|
|
16852
|
+
order: "PO \xB7 ERP/SAP",
|
|
16853
|
+
report: "painel reposi\xE7\xE3o"
|
|
16854
|
+
},
|
|
16806
16855
|
graph: buildGraph(
|
|
16807
16856
|
[
|
|
16808
16857
|
node("start", "start", "Daily sweep", 0, 120),
|
|
@@ -16840,6 +16889,16 @@ var hrWorkflow = {
|
|
|
16840
16889
|
description: "Screen resumes \u2192 rank by fit \u2192 interview scheduling \u2192 decision \u2192 hiring dashboard.",
|
|
16841
16890
|
accentBadge: "bg-green-500/15 text-green-300",
|
|
16842
16891
|
completionSummary: "3 offers extended \xB7 48 candidates processed \xB7 avg cycle 6 days",
|
|
16892
|
+
nodeSubtitles: {
|
|
16893
|
+
start: "vaga publicada",
|
|
16894
|
+
pool: "47 curr\xEDculos",
|
|
16895
|
+
screen: "triagem por skill",
|
|
16896
|
+
rank: "fit score \xB7 top 5",
|
|
16897
|
+
schedule: "agenda integrada",
|
|
16898
|
+
assess: "teste t\xE9cnico",
|
|
16899
|
+
decide: "recomenda\xE7\xE3o",
|
|
16900
|
+
hire: "painel admiss\xE3o"
|
|
16901
|
+
},
|
|
16843
16902
|
graph: buildGraph(
|
|
16844
16903
|
[
|
|
16845
16904
|
node("start", "start", "New posting", 0, 120),
|
|
@@ -16877,6 +16936,16 @@ var customerAnalyticsWorkflow = {
|
|
|
16877
16936
|
description: "Segment customers \u2192 parallel churn and LTV models \u2192 combine \u2192 recommend retention plays.",
|
|
16878
16937
|
accentBadge: "bg-indigo-500/15 text-indigo-300",
|
|
16879
16938
|
completionSummary: "4 at-risk segments identified \xB7 17 retention plays ranked by expected LTV lift",
|
|
16939
|
+
nodeSubtitles: {
|
|
16940
|
+
start: "cron noturno",
|
|
16941
|
+
events: "12k eventos \xB7 30d",
|
|
16942
|
+
segment: "clusters \xB7 k=8",
|
|
16943
|
+
churn: "modelo \xB7 risco%",
|
|
16944
|
+
ltv: "modelo \xB7 R$/cliente",
|
|
16945
|
+
combine: "matriz risco \xD7 LTV",
|
|
16946
|
+
actions: "plays priorizados",
|
|
16947
|
+
dashboard: "painel reten\xE7\xE3o"
|
|
16948
|
+
},
|
|
16880
16949
|
graph: buildGraph(
|
|
16881
16950
|
[
|
|
16882
16951
|
node("start", "start", "Nightly analytics", 0, 120),
|
|
@@ -16914,6 +16983,17 @@ var payrollWorkflow = {
|
|
|
16914
16983
|
description: "Ponto \u2192 c\xE1lculos paralelos (FGTS / INSS / IRRF) \u2192 encargos \u2192 S-1200 \u2192 dashboard.",
|
|
16915
16984
|
accentBadge: "bg-cyan-500/15 text-cyan-300",
|
|
16916
16985
|
completionSummary: "142 holerites processados \xB7 R$ 890k bruto \xB7 eSocial S-1200 transmitido",
|
|
16986
|
+
nodeSubtitles: {
|
|
16987
|
+
start: "m\xEAs fechado",
|
|
16988
|
+
attendance: "ponto \xB7 142 colab",
|
|
16989
|
+
fgts: "8% \xB7 GRRF",
|
|
16990
|
+
inss: "tabela progressiva",
|
|
16991
|
+
irrf: "tabela vigente",
|
|
16992
|
+
aggregate: "Laura \xB7 holerites",
|
|
16993
|
+
esocial: "evento S-1200",
|
|
16994
|
+
transmit: "TXT \xB7 governo",
|
|
16995
|
+
report: "painel folha"
|
|
16996
|
+
},
|
|
16917
16997
|
graph: buildGraph(
|
|
16918
16998
|
[
|
|
16919
16999
|
node("start", "start", "Fechamento mensal", 0, 120),
|
|
@@ -16954,6 +17034,17 @@ var supportWorkflow = {
|
|
|
16954
17034
|
description: "Ticket \u2192 paralelo (hist\xF3rico do cliente, status do pedido, base de conhecimento) \u2192 classificar \u2192 rascunhar \u2192 revisar \u2192 responder.",
|
|
16955
17035
|
accentBadge: "bg-teal-500/15 text-teal-300",
|
|
16956
17036
|
completionSummary: "Ticket respondido em 2min \xB7 CSAT esperado 4.8/5 \xB7 SLA cumprido",
|
|
17037
|
+
nodeSubtitles: {
|
|
17038
|
+
start: "Maria \xB7 #847",
|
|
17039
|
+
history: "CRM \xB7 18 meses",
|
|
17040
|
+
order: "rastreio Correios",
|
|
17041
|
+
kb: "FAQ \xB7 embeddings",
|
|
17042
|
+
classify: "intent \xB7 prioridade",
|
|
17043
|
+
gate: "urgente?",
|
|
17044
|
+
draft: "Camila \xB7 resposta",
|
|
17045
|
+
review: "humano (opt)",
|
|
17046
|
+
send: "WhatsApp \xB7 email"
|
|
17047
|
+
},
|
|
16957
17048
|
graph: buildGraph(
|
|
16958
17049
|
[
|
|
16959
17050
|
node("start", "start", "Ticket #847", 0, 120),
|
|
@@ -16994,6 +17085,16 @@ var manufacturingWorkflow = {
|
|
|
16994
17085
|
description: "Demanda \u2192 BOM \u2192 verificar estoque \u2192 alocar centros de trabalho \u2192 QC \u2192 liberar OPs.",
|
|
16995
17086
|
accentBadge: "bg-violet-500/15 text-violet-300",
|
|
16996
17087
|
completionSummary: "34 OPs liberadas \xB7 OEE 87% \xB7 3 desvios de QC tratados automaticamente",
|
|
17088
|
+
nodeSubtitles: {
|
|
17089
|
+
start: "cron semanal",
|
|
17090
|
+
demand: "forecast S&OP",
|
|
17091
|
+
bom: "componentes \xB7 280",
|
|
17092
|
+
stock: "mat\xE9ria-prima",
|
|
17093
|
+
schedule: "MRP \xB7 5 centros",
|
|
17094
|
+
release: "34 OPs",
|
|
17095
|
+
qc: "amostragem \xB7 99.4%",
|
|
17096
|
+
report: "painel produ\xE7\xE3o"
|
|
17097
|
+
},
|
|
16997
17098
|
graph: buildGraph(
|
|
16998
17099
|
[
|
|
16999
17100
|
node("start", "start", "Trigger MRP semanal", 0, 120),
|
|
@@ -17031,6 +17132,16 @@ var logisticsWorkflow = {
|
|
|
17031
17132
|
description: "Pedidos \u2192 paralelo (tr\xE2nsito, frota, janelas) \u2192 otimizador \u2192 despacho \u2192 tracking.",
|
|
17032
17133
|
accentBadge: "bg-sky-500/15 text-sky-300",
|
|
17033
17134
|
completionSummary: "28 entregas roteirizadas \xB7 -12% km \xB7 94% on-time esperado",
|
|
17135
|
+
nodeSubtitles: {
|
|
17136
|
+
start: "28 pedidos SP",
|
|
17137
|
+
traffic: "Google Maps API",
|
|
17138
|
+
fleet: "4 ve\xEDculos \xB7 disp",
|
|
17139
|
+
windows: "janelas \xB7 cliente",
|
|
17140
|
+
optimize: "TSP \xB7 OR-tools",
|
|
17141
|
+
dispatch: "app motorista",
|
|
17142
|
+
notify: "WhatsApp Bus",
|
|
17143
|
+
track: "painel ao vivo"
|
|
17144
|
+
},
|
|
17034
17145
|
graph: buildGraph(
|
|
17035
17146
|
[
|
|
17036
17147
|
node("start", "start", "28 pedidos SP", 0, 120),
|
|
@@ -17068,6 +17179,15 @@ var lgpdWorkflow = {
|
|
|
17068
17179
|
description: "Scan audit logs \u2192 detect PII access violations \u2192 remediate \u2192 notify DPO \u2192 report.",
|
|
17069
17180
|
accentBadge: "bg-red-500/15 text-red-300",
|
|
17070
17181
|
completionSummary: "2 violations remediated \xB7 DPO notified \xB7 compliance report filed",
|
|
17182
|
+
nodeSubtitles: {
|
|
17183
|
+
start: "sweep di\xE1rio",
|
|
17184
|
+
logs: "CloudTrail \xB7 24h",
|
|
17185
|
+
scan: "Roberta \xB7 regex PII",
|
|
17186
|
+
gate: "viola\xE7\xF5es?",
|
|
17187
|
+
remediate: "mascarar \xB7 notificar",
|
|
17188
|
+
notify: "email DPO",
|
|
17189
|
+
report: "painel ANPD"
|
|
17190
|
+
},
|
|
17071
17191
|
graph: buildGraph(
|
|
17072
17192
|
[
|
|
17073
17193
|
node("start", "start", "Daily privacy sweep", 0, 120),
|
|
@@ -17124,6 +17244,20 @@ var koriAssistantTheme = {
|
|
|
17124
17244
|
badge: "bg-amber-500/15 text-amber-700 dark:text-amber-300"
|
|
17125
17245
|
}
|
|
17126
17246
|
};
|
|
17247
|
+
var DEFAULT_LABELS = {
|
|
17248
|
+
conversation: (persona, department) => `Conversa \u2014 ${persona} \xB7 ${department}`,
|
|
17249
|
+
composerHint: "Mensagem para Kori AI\u2026",
|
|
17250
|
+
composerEnter: "\u23CE enviar",
|
|
17251
|
+
personaTag: (persona) => persona.toUpperCase(),
|
|
17252
|
+
assistantResponse: (count) => `Entendi. Vou ativar ${count} agentes especializados e orquestrar o fluxo no Astrlabe.`,
|
|
17253
|
+
stageAsk: "Ask",
|
|
17254
|
+
stageOrchestrate: "Orchestrate",
|
|
17255
|
+
stageDeliver: "Deliver",
|
|
17256
|
+
footerInput: "Usu\xE1rio envia um pedido ao assistente\u2026",
|
|
17257
|
+
footerWorkflow: "Astrlabe orquestrando agentes e datasources\u2026",
|
|
17258
|
+
footerDashboard: "Pronto \u2014 dashboard do ERP atualizado.",
|
|
17259
|
+
workflowStep: (current, total) => `Etapa ${current} de ${total}`
|
|
17260
|
+
};
|
|
17127
17261
|
function DepartmentAssistantDemo({
|
|
17128
17262
|
flows,
|
|
17129
17263
|
initialIndex = 0,
|
|
@@ -17133,20 +17267,29 @@ function DepartmentAssistantDemo({
|
|
|
17133
17267
|
workflowStepMs = 1050,
|
|
17134
17268
|
theme,
|
|
17135
17269
|
brandName = "Kori AI Assistant",
|
|
17270
|
+
labels,
|
|
17136
17271
|
className
|
|
17137
17272
|
}) {
|
|
17138
17273
|
const t = { ...DEFAULT_ASSISTANT_THEME, ...theme, workflow: { ...DEFAULT_ASSISTANT_THEME.workflow, ...theme?.workflow } };
|
|
17274
|
+
const L = { ...DEFAULT_LABELS, ...labels };
|
|
17139
17275
|
const [flowIndex, setFlowIndex] = React12.useState(initialIndex);
|
|
17140
17276
|
const [stage, setStage] = React12.useState("input");
|
|
17141
17277
|
const [userTyped, setUserTyped] = React12.useState("");
|
|
17142
17278
|
const [assistantTyped, setAssistantTyped] = React12.useState("");
|
|
17143
17279
|
const [inputPhase, setInputPhase] = React12.useState("user");
|
|
17280
|
+
const [workflowStepIndex, setWorkflowStepIndex] = React12.useState(-1);
|
|
17281
|
+
const [workflowStepLabel, setWorkflowStepLabel] = React12.useState("");
|
|
17144
17282
|
const rotateTimerRef = React12.useRef(null);
|
|
17145
17283
|
const flow = flows[flowIndex];
|
|
17284
|
+
const totalSteps = flow.workflow.steps.length;
|
|
17146
17285
|
const assistantMessage = React12.useMemo(
|
|
17147
|
-
() =>
|
|
17148
|
-
[flow.agents.length]
|
|
17286
|
+
() => L.assistantResponse(flow.agents.length),
|
|
17287
|
+
[flow.agents.length, L]
|
|
17149
17288
|
);
|
|
17289
|
+
React12.useEffect(() => {
|
|
17290
|
+
setWorkflowStepIndex(-1);
|
|
17291
|
+
setWorkflowStepLabel("");
|
|
17292
|
+
}, [flow.id]);
|
|
17150
17293
|
React12.useEffect(() => {
|
|
17151
17294
|
if (stage === "input") {
|
|
17152
17295
|
setInputPhase("user");
|
|
@@ -17233,11 +17376,22 @@ function DepartmentAssistantDemo({
|
|
|
17233
17376
|
}) })
|
|
17234
17377
|
] }),
|
|
17235
17378
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-white/5 px-6 py-3 flex items-center gap-3 text-[11px]", children: [
|
|
17236
|
-
/* @__PURE__ */ jsxRuntime.jsx(StageChip, { label:
|
|
17379
|
+
/* @__PURE__ */ jsxRuntime.jsx(StageChip, { label: L.stageAsk, stageIndex, mine: 0, activeBadge: t.stageActiveBadge }),
|
|
17237
17380
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px flex-1 bg-gradient-to-r from-white/10 to-white/5" }),
|
|
17238
|
-
/* @__PURE__ */ jsxRuntime.jsx(StageChip, { label:
|
|
17381
|
+
/* @__PURE__ */ jsxRuntime.jsx(StageChip, { label: L.stageOrchestrate, stageIndex, mine: 1, activeBadge: t.stageActiveBadge }),
|
|
17239
17382
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px flex-1 bg-gradient-to-r from-white/5 to-white/10" }),
|
|
17240
|
-
/* @__PURE__ */ jsxRuntime.jsx(StageChip, { label:
|
|
17383
|
+
/* @__PURE__ */ jsxRuntime.jsx(StageChip, { label: L.stageDeliver, stageIndex, mine: 2, activeBadge: t.stageActiveBadge })
|
|
17384
|
+
] }),
|
|
17385
|
+
stage === "workflow" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-white/5 px-6 py-2.5 flex items-center gap-3", children: [
|
|
17386
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: flow.workflow.steps.map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
17387
|
+
"span",
|
|
17388
|
+
{
|
|
17389
|
+
className: `h-1 w-3.5 rounded-full transition-all duration-500 ${workflowStepIndex < 0 ? "bg-white/10" : index < workflowStepIndex ? "bg-emerald-500" : index === workflowStepIndex ? `${t.progressActiveBar} animate-pulse` : "bg-white/10"}`
|
|
17390
|
+
},
|
|
17391
|
+
index
|
|
17392
|
+
)) }),
|
|
17393
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-bold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: L.workflowStep(workflowStepIndex + 1, totalSteps) }),
|
|
17394
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-[11px] text-gray-700 dark:text-gray-200 flex-1", children: workflowStepLabel || flow.workflow.steps[0]?.label })
|
|
17241
17395
|
] }),
|
|
17242
17396
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", style: { height: 620 }, children: /* @__PURE__ */ jsxRuntime.jsxs(framerMotion.AnimatePresence, { mode: "wait", children: [
|
|
17243
17397
|
stage === "input" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17261,7 +17415,11 @@ function DepartmentAssistantDemo({
|
|
|
17261
17415
|
agents: flow.agents,
|
|
17262
17416
|
agentAvatars: flow.agentAvatars,
|
|
17263
17417
|
avatarGradient: t.inputAvatar,
|
|
17264
|
-
cursorClass: t.inputCursor
|
|
17418
|
+
cursorClass: t.inputCursor,
|
|
17419
|
+
conversationLabel: L.conversation,
|
|
17420
|
+
personaTagFn: L.personaTag,
|
|
17421
|
+
composerHint: L.composerHint,
|
|
17422
|
+
composerEnter: L.composerEnter
|
|
17265
17423
|
}
|
|
17266
17424
|
)
|
|
17267
17425
|
},
|
|
@@ -17283,6 +17441,10 @@ function DepartmentAssistantDemo({
|
|
|
17283
17441
|
hideHeader: true,
|
|
17284
17442
|
stepDurationMs: workflowStepMs,
|
|
17285
17443
|
onComplete: handleWorkflowComplete,
|
|
17444
|
+
onStepChange: (idx, label) => {
|
|
17445
|
+
setWorkflowStepIndex(idx);
|
|
17446
|
+
setWorkflowStepLabel(label);
|
|
17447
|
+
},
|
|
17286
17448
|
theme: t.workflow,
|
|
17287
17449
|
nodeAvatars: flow.nodeAvatars
|
|
17288
17450
|
},
|
|
@@ -17308,9 +17470,9 @@ function DepartmentAssistantDemo({
|
|
|
17308
17470
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-[11px] text-gray-500 dark:text-gray-400", children: [
|
|
17309
17471
|
/* @__PURE__ */ jsxRuntime.jsx(HeroIcons.BoltIcon, { className: `h-3.5 w-3.5 ${t.progressActiveBar.replace("bg-", "text-")}` }),
|
|
17310
17472
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-medium", children: [
|
|
17311
|
-
stage === "input" &&
|
|
17312
|
-
stage === "workflow" &&
|
|
17313
|
-
stage === "dashboard" &&
|
|
17473
|
+
stage === "input" && L.footerInput,
|
|
17474
|
+
stage === "workflow" && L.footerWorkflow,
|
|
17475
|
+
stage === "dashboard" && L.footerDashboard
|
|
17314
17476
|
] })
|
|
17315
17477
|
] }),
|
|
17316
17478
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: flows.map((entry, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17348,7 +17510,11 @@ function InputStage3({
|
|
|
17348
17510
|
agents,
|
|
17349
17511
|
agentAvatars,
|
|
17350
17512
|
avatarGradient,
|
|
17351
|
-
cursorClass
|
|
17513
|
+
cursorClass,
|
|
17514
|
+
conversationLabel,
|
|
17515
|
+
personaTagFn,
|
|
17516
|
+
composerHint,
|
|
17517
|
+
composerEnter
|
|
17352
17518
|
}) {
|
|
17353
17519
|
const cursor = /* @__PURE__ */ jsxRuntime.jsx("span", { className: `ml-0.5 inline-block w-[2px] h-4 align-middle ${cursorClass} animate-pulse` });
|
|
17354
17520
|
const showAssistant = phase === "assistant";
|
|
@@ -17356,10 +17522,7 @@ function InputStage3({
|
|
|
17356
17522
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full flex-col px-4 py-6 sm:px-8", children: [
|
|
17357
17523
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-5 flex items-center justify-center gap-2 text-[10px] font-semibold uppercase tracking-wider text-gray-400 dark:text-gray-500", children: [
|
|
17358
17524
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-1 w-1 rounded-full bg-emerald-500 animate-pulse" }),
|
|
17359
|
-
|
|
17360
|
-
personaName,
|
|
17361
|
-
" \xB7 ",
|
|
17362
|
-
department
|
|
17525
|
+
conversationLabel(personaName, department)
|
|
17363
17526
|
] }),
|
|
17364
17527
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto flex w-full max-w-3xl flex-1 flex-col justify-end gap-4 overflow-hidden", children: [
|
|
17365
17528
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "liquid-surface max-w-[88%] rounded-2xl rounded-tr-md px-5 py-3.5", children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-base leading-relaxed text-gray-900 dark:text-white", children: [
|
|
@@ -17376,7 +17539,7 @@ function InputStage3({
|
|
|
17376
17539
|
}
|
|
17377
17540
|
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex h-11 w-11 shrink-0 items-center justify-center rounded-2xl bg-gradient-to-br ${avatarGradient} shadow-md`, children: /* @__PURE__ */ jsxRuntime.jsx(HeroIcons.SparklesIcon, { className: "h-5 w-5 text-white" }) }),
|
|
17378
17541
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liquid-surface max-w-[88%] rounded-2xl rounded-bl-md px-5 py-3.5", children: [
|
|
17379
|
-
assistantMessage.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-1 text-[10px] font-bold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: personaName }),
|
|
17542
|
+
assistantMessage.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-1 text-[10px] font-bold uppercase tracking-wider text-gray-500 dark:text-gray-400", children: personaTagFn(personaName) }),
|
|
17380
17543
|
assistantMessage.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 py-1", children: [
|
|
17381
17544
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `h-1.5 w-1.5 rounded-full ${cursorClass} animate-pulse` }),
|
|
17382
17545
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `h-1.5 w-1.5 rounded-full ${cursorClass} animate-pulse`, style: { animationDelay: "150ms" } }),
|
|
@@ -17405,8 +17568,8 @@ function InputStage3({
|
|
|
17405
17568
|
] })
|
|
17406
17569
|
] }),
|
|
17407
17570
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto mt-5 w-full max-w-3xl", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liquid-surface flex items-center gap-3 rounded-full px-4 py-2.5 opacity-60", children: [
|
|
17408
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs italic text-gray-500 dark:text-gray-400", children:
|
|
17409
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-auto flex items-center gap-1 text-[10px] text-gray-400 dark:text-gray-500", children:
|
|
17571
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs italic text-gray-500 dark:text-gray-400", children: composerHint }),
|
|
17572
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-auto flex items-center gap-1 text-[10px] text-gray-400 dark:text-gray-500", children: composerEnter })
|
|
17410
17573
|
] }) })
|
|
17411
17574
|
] });
|
|
17412
17575
|
}
|
|
@@ -25414,5 +25577,5 @@ exports.usePullToRefresh = usePullToRefresh;
|
|
|
25414
25577
|
exports.validateDashboardSpec = validateDashboardSpec;
|
|
25415
25578
|
exports.xScale = xScale;
|
|
25416
25579
|
exports.yScale = yScale;
|
|
25417
|
-
//# sourceMappingURL=chunk-
|
|
25418
|
-
//# sourceMappingURL=chunk-
|
|
25580
|
+
//# sourceMappingURL=chunk-KNXAOJAK.js.map
|
|
25581
|
+
//# sourceMappingURL=chunk-KNXAOJAK.js.map
|