@iann29/rastro 0.10.9 → 0.11.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/README.md +8 -0
- package/agent/integration.md +45 -0
- package/agent/manifest.json +4 -4
- package/dist/client/federation.d.ts +82 -9
- package/dist/client/federation.d.ts.map +1 -1
- package/dist/client/federation.js +40 -2
- package/dist/client/federation.js.map +1 -1
- package/dist/client/index.d.ts +464 -8
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +259 -7
- package/dist/client/index.js.map +1 -1
- package/dist/component/_generated/api.d.ts +10 -0
- package/dist/component/_generated/api.d.ts.map +1 -1
- package/dist/component/_generated/api.js.map +1 -1
- package/dist/component/_generated/component.d.ts +273 -21
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/_generated/server.d.ts +2 -0
- package/dist/component/_generated/server.d.ts.map +1 -1
- package/dist/component/_generated/server.js.map +1 -1
- package/dist/component/constants.d.ts +31 -0
- package/dist/component/constants.d.ts.map +1 -1
- package/dist/component/constants.js +31 -0
- package/dist/component/constants.js.map +1 -1
- package/dist/component/convex.config.d.ts +2 -0
- package/dist/component/convex.config.js +7 -0
- package/dist/component/convex.config.js.map +1 -1
- package/dist/component/errors.d.ts +1 -1
- package/dist/component/errors.d.ts.map +1 -1
- package/dist/component/errors.js.map +1 -1
- package/dist/component/http.d.ts.map +1 -1
- package/dist/component/http.js +64 -0
- package/dist/component/http.js.map +1 -1
- package/dist/component/leadAdsValidators.d.ts +1092 -0
- package/dist/component/leadAdsValidators.d.ts.map +1 -0
- package/dist/component/leadAdsValidators.js +304 -0
- package/dist/component/leadAdsValidators.js.map +1 -0
- package/dist/component/leadFormRules.d.ts +60 -0
- package/dist/component/leadFormRules.d.ts.map +1 -0
- package/dist/component/leadFormRules.js +140 -0
- package/dist/component/leadFormRules.js.map +1 -0
- package/dist/component/leadFormStore.d.ts +16 -0
- package/dist/component/leadFormStore.d.ts.map +1 -0
- package/dist/component/leadFormStore.js +92 -0
- package/dist/component/leadFormStore.js.map +1 -0
- package/dist/component/leadgenToken.d.ts +56 -0
- package/dist/component/leadgenToken.d.ts.map +1 -0
- package/dist/component/leadgenToken.js +262 -0
- package/dist/component/leadgenToken.js.map +1 -0
- package/dist/component/leads.d.ts +76 -7
- package/dist/component/leads.d.ts.map +1 -1
- package/dist/component/leads.js +112 -78
- package/dist/component/leads.js.map +1 -1
- package/dist/component/meta.d.ts.map +1 -1
- package/dist/component/meta.js +21 -1
- package/dist/component/meta.js.map +1 -1
- package/dist/component/metaFake.d.ts +44 -0
- package/dist/component/metaFake.d.ts.map +1 -1
- package/dist/component/metaFake.js +400 -1
- package/dist/component/metaFake.js.map +1 -1
- package/dist/component/metaGraph.d.ts +91 -0
- package/dist/component/metaGraph.d.ts.map +1 -1
- package/dist/component/metaGraph.js +217 -0
- package/dist/component/metaGraph.js.map +1 -1
- package/dist/component/metaLeads.d.ts +681 -0
- package/dist/component/metaLeads.d.ts.map +1 -0
- package/dist/component/metaLeads.js +2634 -0
- package/dist/component/metaLeads.js.map +1 -0
- package/dist/component/schema.d.ts +414 -5
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/schema.js +169 -1
- package/dist/component/schema.js.map +1 -1
- package/dist/component/validators.d.ts +235 -11
- package/dist/component/validators.d.ts.map +1 -1
- package/dist/component/validators.js +14 -1
- package/dist/component/validators.js.map +1 -1
- package/dist/tracker/generated.d.ts +1 -1
- package/dist/tracker/generated.js +1 -1
- package/dist/ui/campaigns/CampaignsView.d.ts +5 -1
- package/dist/ui/campaigns/CampaignsView.d.ts.map +1 -1
- package/dist/ui/campaigns/CampaignsView.js.map +1 -1
- package/dist/ui/campaigns/Drawer.d.ts.map +1 -1
- package/dist/ui/campaigns/Drawer.js +8 -26
- package/dist/ui/campaigns/Drawer.js.map +1 -1
- package/dist/ui/campaigns/labels.d.ts +29 -1
- package/dist/ui/campaigns/labels.d.ts.map +1 -1
- package/dist/ui/campaigns/labels.js +77 -2
- package/dist/ui/campaigns/labels.js.map +1 -1
- package/dist/ui/campaigns/model.js +2 -2
- package/dist/ui/campaigns/model.js.map +1 -1
- package/dist/ui/forms/FirstContact.d.ts +19 -0
- package/dist/ui/forms/FirstContact.d.ts.map +1 -0
- package/dist/ui/forms/FirstContact.js +81 -0
- package/dist/ui/forms/FirstContact.js.map +1 -0
- package/dist/ui/forms/FormLead.d.ts +28 -0
- package/dist/ui/forms/FormLead.d.ts.map +1 -0
- package/dist/ui/forms/FormLead.js +199 -0
- package/dist/ui/forms/FormLead.js.map +1 -0
- package/dist/ui/forms/FormRulesDrawer.d.ts +49 -0
- package/dist/ui/forms/FormRulesDrawer.d.ts.map +1 -0
- package/dist/ui/forms/FormRulesDrawer.js +149 -0
- package/dist/ui/forms/FormRulesDrawer.js.map +1 -0
- package/dist/ui/forms/FormsView.d.ts +10 -0
- package/dist/ui/forms/FormsView.d.ts.map +1 -0
- package/dist/ui/forms/FormsView.js +215 -0
- package/dist/ui/forms/FormsView.js.map +1 -0
- package/dist/ui/forms/Icons.d.ts +46 -0
- package/dist/ui/forms/Icons.d.ts.map +1 -0
- package/dist/ui/forms/Icons.js +45 -0
- package/dist/ui/forms/Icons.js.map +1 -0
- package/dist/ui/forms/RuleRow.d.ts +37 -0
- package/dist/ui/forms/RuleRow.d.ts.map +1 -0
- package/dist/ui/forms/RuleRow.js +80 -0
- package/dist/ui/forms/RuleRow.js.map +1 -0
- package/dist/ui/forms/WhatsAppButtonGuide.d.ts +33 -0
- package/dist/ui/forms/WhatsAppButtonGuide.d.ts.map +1 -0
- package/dist/ui/forms/WhatsAppButtonGuide.js +90 -0
- package/dist/ui/forms/WhatsAppButtonGuide.js.map +1 -0
- package/dist/ui/forms/index.d.ts +11 -0
- package/dist/ui/forms/index.d.ts.map +1 -0
- package/dist/ui/forms/index.js +7 -0
- package/dist/ui/forms/index.js.map +1 -0
- package/dist/ui/forms/journey.d.ts +19 -0
- package/dist/ui/forms/journey.d.ts.map +1 -0
- package/dist/ui/forms/journey.js +54 -0
- package/dist/ui/forms/journey.js.map +1 -0
- package/dist/ui/forms/model.d.ts +239 -0
- package/dist/ui/forms/model.d.ts.map +1 -0
- package/dist/ui/forms/model.js +556 -0
- package/dist/ui/forms/model.js.map +1 -0
- package/dist/ui/forms/sample.d.ts +36 -0
- package/dist/ui/forms/sample.d.ts.map +1 -0
- package/dist/ui/forms/sample.js +444 -0
- package/dist/ui/forms/sample.js.map +1 -0
- package/dist/ui/forms/types.d.ts +454 -0
- package/dist/ui/forms/types.d.ts.map +1 -0
- package/dist/ui/forms/types.js +2 -0
- package/dist/ui/forms/types.js.map +1 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +4 -0
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/integrations/Overlay.d.ts +3 -1
- package/dist/ui/integrations/Overlay.d.ts.map +1 -1
- package/dist/ui/integrations/Overlay.js +2 -2
- package/dist/ui/integrations/Overlay.js.map +1 -1
- package/dist/ui/portfolio/PortfolioView.d.ts +4 -1
- package/dist/ui/portfolio/PortfolioView.d.ts.map +1 -1
- package/dist/ui/portfolio/PortfolioView.js.map +1 -1
- package/dist/ui/sample.d.ts +3 -1
- package/dist/ui/sample.d.ts.map +1 -1
- package/dist/ui/sample.js +2 -0
- package/dist/ui/sample.js.map +1 -1
- package/dist/ui/seed.d.ts +1 -1
- package/dist/ui/ui.css +2301 -0
- package/docs/federation.md +19 -0
- package/docs/meta-ads.md +713 -7
- package/docs/upgrading.md +70 -0
- package/llms.txt +1 -0
- package/package.json +1 -1
- package/src/component/_generated/api.ts +10 -0
- package/src/component/_generated/component.ts +289 -20
- package/src/component/_generated/server.ts +2 -0
- package/src/component/constants.ts +33 -0
- package/src/component/convex.config.ts +7 -0
- package/src/component/errors.ts +3 -1
- package/src/component/http.ts +75 -0
- package/src/component/leadAdsValidators.ts +365 -0
- package/src/component/leadFormRules.ts +202 -0
- package/src/component/leadFormStore.ts +129 -0
- package/src/component/leadgenToken.ts +348 -0
- package/src/component/leads.ts +136 -84
- package/src/component/meta.ts +21 -1
- package/src/component/metaFake.ts +485 -1
- package/src/component/metaGraph.ts +327 -0
- package/src/component/metaLeads.ts +3101 -0
- package/src/component/schema.ts +187 -1
- package/src/component/validators.ts +17 -1
- package/src/tracker/generated.ts +1 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId, useRef } from "react";
|
|
3
|
+
import { MetaMark } from "../integrations/Icons.js";
|
|
4
|
+
import { Overlay } from "../integrations/Overlay.js";
|
|
5
|
+
import { Glyph, Icon } from "./Icons.js";
|
|
6
|
+
import { metaFormsUrl } from "./model.js";
|
|
7
|
+
/** "Clínica Sorriso" → "CS". */
|
|
8
|
+
const pageInitials = (name) => {
|
|
9
|
+
const words = name.trim().split(/\s+/).filter(Boolean);
|
|
10
|
+
return (words.length > 1
|
|
11
|
+
? `${words[0][0]}${words[1][0]}`
|
|
12
|
+
: (words[0] ?? "?").slice(0, 2)).toLocaleUpperCase("pt-BR");
|
|
13
|
+
};
|
|
14
|
+
/** "Recepção · (11) 94567-1200" → "da Recepção". */
|
|
15
|
+
const senderOf = (senderLabel) => {
|
|
16
|
+
const name = senderLabel?.split(" · ")[0]?.trim();
|
|
17
|
+
return name ? `da ${name}` : "da empresa";
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* What Rastro can check on its own, from the Page's forms: the copy with the
|
|
21
|
+
* button published (a published form cannot be edited, so the company
|
|
22
|
+
* duplicates it), and the button on its end screen as Meta shows it.
|
|
23
|
+
*/
|
|
24
|
+
export function guideChecks(form, pageForms) {
|
|
25
|
+
const copy = pageForms.find((entry) => entry.formId !== form.formId &&
|
|
26
|
+
entry.status === "ACTIVE" &&
|
|
27
|
+
entry.name.startsWith(form.name));
|
|
28
|
+
const target = form.whatsappButton === true ? form : (copy ?? form);
|
|
29
|
+
const checks = [];
|
|
30
|
+
if (target !== form || form.whatsappButton === true)
|
|
31
|
+
checks.push({ label: `${target.name} encontrado na Página.`, state: "ok" });
|
|
32
|
+
else
|
|
33
|
+
checks.push({
|
|
34
|
+
label: `Cópia de ${form.name} publicada na Página.`,
|
|
35
|
+
state: "todo",
|
|
36
|
+
});
|
|
37
|
+
checks.push({
|
|
38
|
+
label: target.whatsappButton === true
|
|
39
|
+
? "Botão WhatsApp na tela final."
|
|
40
|
+
: target.whatsappButton === false
|
|
41
|
+
? "Botão WhatsApp na tela final · aguardando publicar"
|
|
42
|
+
: "Botão WhatsApp na tela final · a Meta não mostra, confirme no formulário",
|
|
43
|
+
state: target.whatsappButton === true
|
|
44
|
+
? "ok"
|
|
45
|
+
: target.whatsappButton === false
|
|
46
|
+
? "waiting"
|
|
47
|
+
: "todo",
|
|
48
|
+
});
|
|
49
|
+
checks.push({
|
|
50
|
+
label: "Mensagem pré-preenchida com o nome do formulário (opcional)",
|
|
51
|
+
state: "optional",
|
|
52
|
+
});
|
|
53
|
+
return checks;
|
|
54
|
+
}
|
|
55
|
+
function CheckMark({ state }) {
|
|
56
|
+
if (state === "ok")
|
|
57
|
+
return (_jsx("span", { className: "rastro-forms__chk", "data-state": "ok", children: _jsx(Icon, { name: "check", size: 11, stroke: 3 }) }));
|
|
58
|
+
return _jsx("span", { className: "rastro-forms__chk", "data-state": state });
|
|
59
|
+
}
|
|
60
|
+
const STATE_WORDS = {
|
|
61
|
+
ok: "feito",
|
|
62
|
+
waiting: "aguardando",
|
|
63
|
+
todo: "a fazer",
|
|
64
|
+
optional: "opcional",
|
|
65
|
+
};
|
|
66
|
+
/** The illustration of Meta's form editor, step 3 ringed. */
|
|
67
|
+
function MetaEditor({ form, pageName, whatsappNumber, }) {
|
|
68
|
+
return (_jsxs("div", { className: "rastro-forms__mwin", "aria-hidden": "true", children: [_jsxs("div", { className: "rastro-forms__chrome", children: [_jsx("i", {}), _jsx("i", {}), _jsx("i", {}), _jsxs("div", { className: "rastro-forms__url", children: [_jsx(Icon, { name: "lock", size: 11 }), "adsmanager.facebook.com \u203A Formul\u00E1rios instant\u00E2neos"] })] }), _jsxs("div", { className: "rastro-forms__mtop", children: [_jsx(MetaMark, { size: 22 }), _jsxs("span", { className: "rastro-forms__grow", children: [form.name, " (c\u00F3pia)"] }), _jsxs("span", { className: "rastro-forms__mb", children: [_jsx("span", { children: "Salvar rascunho" }), _jsx("span", { "data-primary": "", children: "Publicar" })] })] }), _jsxs("div", { className: "rastro-forms__mbody", children: [_jsxs("div", { className: "rastro-forms__mleft", children: [[
|
|
69
|
+
"Tipo de formulário",
|
|
70
|
+
"Introdução",
|
|
71
|
+
"Perguntas",
|
|
72
|
+
"Política de privacidade",
|
|
73
|
+
].map((title) => (_jsx("div", { className: "rastro-forms__msec", children: _jsxs("div", { className: "rastro-forms__msec-hd", children: [title, _jsx("span", { className: "rastro-forms__mck", children: _jsx(Icon, { name: "check", size: 10, stroke: 3 }) })] }) }, title))), _jsxs("div", { className: "rastro-forms__msec", "data-open": "", children: [_jsxs("div", { className: "rastro-forms__msec-hd", children: ["Tela final", _jsx(Icon, { name: "chevU", size: 16 })] }), _jsxs("div", { className: "rastro-forms__msec-bd", children: [_jsxs("div", { className: "rastro-forms__mf", children: [_jsx("span", { children: "T\u00EDtulo" }), _jsx("div", { children: "Obrigado! Recebemos seu pedido." })] }), _jsxs("div", { className: "rastro-forms__mf", children: [_jsx("span", { children: "Descri\u00E7\u00E3o" }), _jsx("div", { children: "Fale com a gente agora pelo WhatsApp." })] }), _jsxs("div", { className: "rastro-forms__mf", "data-ring": "", children: [_jsx("b", { className: "rastro-forms__ring-n", children: "3" }), _jsx("span", { children: "Bot\u00E3o de chamada para a\u00E7\u00E3o" }), _jsxs("div", { "data-dd": "", children: [_jsxs("span", { className: "rastro-forms__inline", children: [_jsx(Glyph, { brand: "whatsapp", size: 14, color: "#1c2b33" }), "Falar no WhatsApp"] }), _jsx(Icon, { name: "chevD", size: 14 })] })] }), _jsxs("div", { className: "rastro-forms__mf", children: [_jsx("span", { children: "N\u00FAmero do WhatsApp" }), _jsxs("div", { "data-dd": "", children: [_jsx("span", { children: whatsappNumber ?? "+55 00 00000-0000" }), _jsx(Icon, { name: "chevD", size: 14 })] })] }), _jsxs("div", { className: "rastro-forms__mf", children: [_jsx("span", { children: "Mensagem pr\u00E9-preenchida" }), _jsxs("div", { children: ["Oi! Vim do formul\u00E1rio ", form.name, "."] })] })] })] })] }), _jsxs("div", { className: "rastro-forms__mright", children: [_jsx("span", { className: "rastro-forms__mlbl", children: "Pr\u00E9-visualiza\u00E7\u00E3o \u00B7 Tela final" }), _jsxs("div", { className: "rastro-forms__mphone", children: [_jsxs("div", { className: "rastro-forms__mph", children: [_jsx("span", { className: "rastro-forms__mpg", children: pageInitials(pageName) }), pageName] }), _jsxs("div", { className: "rastro-forms__mpb", children: [_jsx("span", { className: "rastro-forms__mok", children: _jsx(Icon, { name: "check", size: 26, stroke: 2.6 }) }), _jsx("strong", { children: "Obrigado! Recebemos seu pedido." }), _jsx("p", { children: "Fale com a gente agora pelo WhatsApp." }), _jsxs("span", { className: "rastro-forms__mcta", children: [_jsx(Glyph, { brand: "whatsapp", size: 15, color: "#fff" }), "Falar no WhatsApp"] })] })] })] })] })] }));
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* D3: turning on the end screen's "Falar no WhatsApp" button, four steps in
|
|
77
|
+
* Meta's form editor, and what Rastro (and the host) can check on their own.
|
|
78
|
+
* The illustration is drawn, not Meta's screen; it hides on a phone.
|
|
79
|
+
*/
|
|
80
|
+
export function WhatsAppButtonGuide({ form, site, page, pageForms = [], campaignName, senderLabel, whatsappNumber, checks = [], productName = "Rastro", formUrl, refreshing = false, onRefresh, onClose, }) {
|
|
81
|
+
const id = useId();
|
|
82
|
+
const close = useRef(null);
|
|
83
|
+
const sender = senderOf(senderLabel);
|
|
84
|
+
const all = [...checks, ...guideChecks(form, pageForms)];
|
|
85
|
+
const pageName = page?.name ?? site.name;
|
|
86
|
+
return (_jsx(Overlay, { className: "rastro-forms__scrim", labelledBy: `${id}-title`, describedBy: `${id}-desc`, initialFocus: close, onClose: onClose, children: _jsxs("div", { className: "rastro-ui rastro-forms rastro-forms__guide", children: [_jsxs("div", { className: "rastro-forms__guide-l", children: [_jsxs("div", { className: "rastro-forms__guide-head", children: [_jsxs("div", { className: "rastro-forms__grow", children: [_jsx("p", { className: "rastro-forms__eyebrow", children: form.name }), _jsx("h2", { id: `${id}-title`, className: "rastro-forms__guide-title", children: "Ligar o bot\u00E3o \u201CFalar no WhatsApp\u201D" })] }), _jsx("button", { ref: close, type: "button", className: "rastro-forms__close", "data-inline": "", "aria-label": "Fechar", onClick: onClose, children: _jsx(Icon, { name: "x", size: 17 }) })] }), _jsx("p", { id: `${id}-desc`, className: "rastro-forms__guide-desc", children: "O lead toca no bot\u00E3o e manda a primeira mensagem. Leva 2 minutos, no Gerenciador de An\u00FAncios." }), _jsxs("ol", { className: "rastro-forms__steps", children: [_jsxs("li", { children: [_jsx("b", { children: "1" }), _jsxs("span", { children: ["Abra o ", _jsx("em", { children: "Gerenciador de An\u00FAncios" }), " no an\u00FAncio", campaignName
|
|
87
|
+
? ` da campanha ${campaignName}`
|
|
88
|
+
: " do formulário", "."] })] }), _jsxs("li", { children: [_jsx("b", { children: "2" }), _jsxs("span", { children: ["Em Formul\u00E1rio instant\u00E2neo, ", _jsx("em", { children: "duplique" }), " ", form.name, ". Formul\u00E1rio publicado n\u00E3o se edita."] })] }), _jsxs("li", { "data-on": "", children: [_jsx("b", { children: "3" }), _jsxs("span", { children: ["Na ", _jsx("em", { children: "Tela final" }), ", escolha o bot\u00E3o Falar no WhatsApp e o n\u00FAmero ", sender, "."] })] }), _jsxs("li", { children: [_jsx("b", { children: "4" }), _jsxs("span", { children: [_jsx("em", { children: "Publique" }), " e troque o formul\u00E1rio no an\u00FAncio."] })] })] }), _jsxs("div", { className: "rastro-forms__guide-checks", children: [_jsxs("p", { className: "rastro-forms__guide-sub", children: ["O ", productName, " confere sozinho"] }), _jsx("ul", { className: "rastro-forms__checks", children: all.map((check) => (_jsxs("li", { "data-state": check.state, children: [_jsx(CheckMark, { state: check.state }), _jsxs("span", { children: [check.label, _jsxs("span", { className: "rastro-forms__sr", children: [" ", "(", STATE_WORDS[check.state], ")"] })] })] }, check.label))) })] }), _jsxs("div", { className: "rastro-forms__guide-actions", children: [_jsxs("a", { className: "rastro-forms__btn", "data-block": "", href: formUrl ?? metaFormsUrl(form), target: "_blank", rel: "noreferrer", children: [_jsx(Icon, { name: "ext", size: 15 }), "Abrir o formul\u00E1rio na Meta"] }), onRefresh && (_jsxs("button", { type: "button", className: "rastro-forms__btn", "data-variant": "outline", "data-block": "", disabled: refreshing, onClick: onRefresh, children: [_jsx(Icon, { name: "refresh", size: 15 }), refreshing ? "Conferindo…" : "Conferir de novo"] }))] })] }), _jsxs("div", { className: "rastro-forms__guide-r", children: [_jsx("span", { className: "rastro-forms__ilus", children: "Ilustra\u00E7\u00E3o da tela da Meta" }), _jsx(MetaEditor, { form: form, pageName: pageName, whatsappNumber: whatsappNumber })] })] }) }));
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=WhatsAppButtonGuide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WhatsAppButtonGuide.js","sourceRoot":"","sources":["../../../src/ui/forms/WhatsAppButtonGuide.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAQ1C,gCAAgC;AAChC,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,EAAE;IACpC,MAAM,KAAK,GAAG,IA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I,uCAE3B,EACH,SAAS,IAAI,CACZ,kBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,mBAAmB,kBAChB,SAAS,gBACX,EAAE,EACb,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,SAAS,aAElB,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAE,EAAE,GAAI,EAChC,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,kBAAkB,IACzC,CACV,IACG,IACF,EACN,eAAK,SAAS,EAAC,uBAAuB,aACpC,eAAM,SAAS,EAAC,oBAAoB,qDAAkC,EACtE,KAAC,UAAU,IACT,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,GAC9B,IACE,IACF,GACE,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { FormsView } from "./FormsView.js";
|
|
2
|
+
export { FormRulesDrawer } from "./FormRulesDrawer.js";
|
|
3
|
+
export type { FormRulesDrawerProps } from "./FormRulesDrawer.js";
|
|
4
|
+
export { guideChecks, WhatsAppButtonGuide } from "./WhatsAppButtonGuide.js";
|
|
5
|
+
export { defaultFormLeadPath, FormLeadAnswers, FormLeadBadge, } from "./FormLead.js";
|
|
6
|
+
export { formLeadFromJourney } from "./journey.js";
|
|
7
|
+
export type { JourneyForm } from "./journey.js";
|
|
8
|
+
export { buttonState, choiceQuestions, DEFAULT_BRAKES, defaultFirstContactText, entryOf, fillTemplate, FIRST_NAME_VARIABLE, formsSummary, formState, formStatusLabel, metaFormsRows, MIN_WAIT_MINUTES, pageErrorCode, pageGroups, pageIssue, pagesWithStatus, reportKey, reportRowOf, rulesSummaryOf, simulationDraftOf, simulationSegments, templateParts, } from "./model.js";
|
|
9
|
+
export type { ButtonState, FormRow, FormState, PageGroup, PageIssue, PageIssueKind, SimulationSegment, } from "./model.js";
|
|
10
|
+
export type { FirstContact, FirstContactBrakes, FirstContactMode, FormBoard, FormColumn, FormColumnCount, FormDiscardCount, FormLead, FormLeadDecision, FormLeadOrigin, FormLeadRuleMatch, FormLeadStep, FormReportRow, FormRule, FormRules, FormRulesChoice, FormRulesDraft, FormRulesSimulation, FormRulesSummary, FormRuleTarget, FormsBusy, FormsReport, FormsViewProps, GuideCheck, MetaForm, MetaFormOption, MetaFormQuestion, MetaFormsPage, MetaFormsRow, MetaFormStatus, MetaPage, SetFormRulesInput, } from "./types.js";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/forms/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EACL,WAAW,EACX,eAAe,EACf,cAAc,EACd,uBAAuB,EACvB,OAAO,EACP,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,SAAS,EACT,eAAe,EACf,SAAS,EACT,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,WAAW,EACX,OAAO,EACP,SAAS,EACT,SAAS,EACT,SAAS,EACT,aAAa,EACb,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,SAAS,EACT,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,WAAW,EACX,cAAc,EACd,UAAU,EACV,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,iBAAiB,GAClB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { FormsView } from "./FormsView.js";
|
|
2
|
+
export { FormRulesDrawer } from "./FormRulesDrawer.js";
|
|
3
|
+
export { guideChecks, WhatsAppButtonGuide } from "./WhatsAppButtonGuide.js";
|
|
4
|
+
export { defaultFormLeadPath, FormLeadAnswers, FormLeadBadge, } from "./FormLead.js";
|
|
5
|
+
export { formLeadFromJourney } from "./journey.js";
|
|
6
|
+
export { buttonState, choiceQuestions, DEFAULT_BRAKES, defaultFirstContactText, entryOf, fillTemplate, FIRST_NAME_VARIABLE, formsSummary, formState, formStatusLabel, metaFormsRows, MIN_WAIT_MINUTES, pageErrorCode, pageGroups, pageIssue, pagesWithStatus, reportKey, reportRowOf, rulesSummaryOf, simulationDraftOf, simulationSegments, templateParts, } from "./model.js";
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/forms/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EACL,WAAW,EACX,eAAe,EACf,cAAc,EACd,uBAAuB,EACvB,OAAO,EACP,YAAY,EACZ,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,SAAS,EACT,eAAe,EACf,SAAS,EACT,WAAW,EACX,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,GACd,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A form lead as the component's lead journey holds it (`leads.journey`,
|
|
3
|
+
* `form`), turned into the `FormLead` the screens draw. Pure: the answers,
|
|
4
|
+
* the origin and the decision only, never the person.
|
|
5
|
+
*/
|
|
6
|
+
import type { LeadJourney } from "../../client/index.js";
|
|
7
|
+
import type { FormBoard, FormLead } from "./types.js";
|
|
8
|
+
/** The journey's form record, when the lead came through an instant form. */
|
|
9
|
+
export type JourneyForm = NonNullable<NonNullable<NonNullable<LeadJourney>["form"]>>;
|
|
10
|
+
/**
|
|
11
|
+
* The journey's `form` as the screens' `FormLead`, or null for a lead that
|
|
12
|
+
* did not come through a form (or an older host's journey). The answers keep
|
|
13
|
+
* the labels the form shows ("Quer agendar" = "Sim"); several values join
|
|
14
|
+
* with commas. `board` names the columns; without it the keys show.
|
|
15
|
+
*/
|
|
16
|
+
export declare function formLeadFromJourney(journey: LeadJourney | undefined, options?: {
|
|
17
|
+
board?: FormBoard;
|
|
18
|
+
}): FormLead | null;
|
|
19
|
+
//# sourceMappingURL=journey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journey.d.ts","sourceRoot":"","sources":["../../../src/ui/forms/journey.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAoB,MAAM,YAAY,CAAC;AAExE,6EAA6E;AAC7E,MAAM,MAAM,WAAW,GAAG,WAAW,CACnC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,CAC9C,CAAC;AAgCF;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,WAAW,GAAG,SAAS,EAChC,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,SAAS,CAAA;CAAO,GAClC,QAAQ,GAAG,IAAI,CAmBjB"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { columnOf, entryOf } from "./model.js";
|
|
2
|
+
/** What the drawer calls a form Meta did not name. */
|
|
3
|
+
const UNNAMED_FORM = "Formulário";
|
|
4
|
+
function decisionOf(form, board) {
|
|
5
|
+
const decision = form.decision;
|
|
6
|
+
if ("discard" in decision)
|
|
7
|
+
return { kind: "discard", reason: decision.discard, rule: null };
|
|
8
|
+
// No column named: the host's own entry, as the board calls it.
|
|
9
|
+
if (decision.column === null) {
|
|
10
|
+
const entry = entryOf(board, null);
|
|
11
|
+
return {
|
|
12
|
+
kind: "entry",
|
|
13
|
+
column: entry.name,
|
|
14
|
+
color: entry.key ? entry.color : null,
|
|
15
|
+
rule: null,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
const column = columnOf(board, decision.column);
|
|
19
|
+
return {
|
|
20
|
+
// A column with no rule deciding is the form's entry column.
|
|
21
|
+
kind: form.ruleIndex === null ? "entry" : "column",
|
|
22
|
+
column: column?.name ?? decision.column,
|
|
23
|
+
color: column?.color ?? null,
|
|
24
|
+
rule: null,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The journey's `form` as the screens' `FormLead`, or null for a lead that
|
|
29
|
+
* did not come through a form (or an older host's journey). The answers keep
|
|
30
|
+
* the labels the form shows ("Quer agendar" = "Sim"); several values join
|
|
31
|
+
* with commas. `board` names the columns; without it the keys show.
|
|
32
|
+
*/
|
|
33
|
+
export function formLeadFromJourney(journey, options = {}) {
|
|
34
|
+
const form = journey?.form;
|
|
35
|
+
if (!form)
|
|
36
|
+
return null;
|
|
37
|
+
const { origin } = form;
|
|
38
|
+
return {
|
|
39
|
+
formName: origin.formName ?? UNNAMED_FORM,
|
|
40
|
+
receivedAt: form.receivedAt,
|
|
41
|
+
answers: form.answers.map((answer) => ({
|
|
42
|
+
question: answer.label,
|
|
43
|
+
answer: answer.values.join(", "),
|
|
44
|
+
})),
|
|
45
|
+
origin: {
|
|
46
|
+
platform: origin.platform,
|
|
47
|
+
campaignName: origin.campaignName,
|
|
48
|
+
adsetName: origin.adsetName,
|
|
49
|
+
adName: origin.adName,
|
|
50
|
+
},
|
|
51
|
+
decision: decisionOf(form, options.board),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=journey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journey.js","sourceRoot":"","sources":["../../../src/ui/forms/journey.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAQ/C,sDAAsD;AACtD,MAAM,YAAY,GAAG,YAAY,CAAC;AAElC,SAAS,UAAU,CACjB,IAAiB,EACjB,KAA4B;IAE5B,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC/B,IAAI,SAAS,IAAI,QAAQ;QACvB,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACnE,gEAAgE;IAChE,IAAI,QAAQ,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;QAC7B,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC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CAAC,SAAS;YAC3B,MAAM,EAAE,MAAM,CAAC,MAAM;SACtB;QACD,QAAQ,EAAE,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC;KAC1C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Formulários screens' pure logic: which Page and form says what, where a
|
|
3
|
+
* draft sends the last 30 days' leads, the suggested text and its variable,
|
|
4
|
+
* and the path a form lead followed. Pure, so the views and their tests read
|
|
5
|
+
* the same answers.
|
|
6
|
+
*/
|
|
7
|
+
import type { FirstContact, FirstContactBrakes, FormBoard, FormColumn, FormReportRow, FormRule, FormRules, FormRulesChoice, FormRulesDraft, FormRulesSimulation, FormRulesSummary, FormsReport, IntegrationSite, MetaForm, MetaFormQuestion, MetaFormsPage, MetaPage } from "./types.js";
|
|
8
|
+
/** Rules a form holds at most: more than this is a funnel, not a form. */
|
|
9
|
+
export declare const MAX_FORM_RULES = 20;
|
|
10
|
+
/** Answers one rule names at most, as the host's `setFormRules` takes. */
|
|
11
|
+
export declare const MAX_RULE_ANSWERS = 30;
|
|
12
|
+
/** The text a discard reason fits in, on the card. */
|
|
13
|
+
export declare const MAX_DISCARD_REASON = 80;
|
|
14
|
+
/** The suggested first message's length. */
|
|
15
|
+
export declare const MAX_FIRST_CONTACT_TEXT = 500;
|
|
16
|
+
/** The first name's variable in the suggested text. */
|
|
17
|
+
export declare const FIRST_NAME_VARIABLE = "{primeiro_nome}";
|
|
18
|
+
/** The brakes the automatic send starts with (the design's D7). */
|
|
19
|
+
export declare const DEFAULT_BRAKES: FirstContactBrakes;
|
|
20
|
+
/** Waiting for the lead to write first never goes under this. */
|
|
21
|
+
export declare const MIN_WAIT_MINUTES = 15;
|
|
22
|
+
export declare const WAIT_CHOICES: readonly [15, 30, 60, 120];
|
|
23
|
+
export declare const PER_HOUR_CHOICES: readonly [5, 10, 20, 30];
|
|
24
|
+
/**
|
|
25
|
+
* The pause between two automatic sends: fixed by the host, shown so the
|
|
26
|
+
* company knows it is there (the contract's brakes have no field for it).
|
|
27
|
+
*/
|
|
28
|
+
export declare const RANDOM_INTERVAL_LABEL = "entre 45 s e 3 min";
|
|
29
|
+
/** "9:02", "14:51", in Brasília time like the rest of the screens. */
|
|
30
|
+
export declare const clockLabel: (at: number) => string;
|
|
31
|
+
/** "hoje, 14:51", "ontem, 19:10", "12/09". */
|
|
32
|
+
export declare function dayLabel(at: number, now: number, { time }?: {
|
|
33
|
+
time?: boolean | undefined;
|
|
34
|
+
}): string;
|
|
35
|
+
/** The form's newest lead: "último há 4 min", "hoje, 9:02", "12/09". */
|
|
36
|
+
export declare function lastLeadLabel(at: number | null | undefined, now: number): string | null;
|
|
37
|
+
/** "há 3 min", "há 1 h", "há 2 d"; "agora" under a minute. */
|
|
38
|
+
export declare function waitLabel(since: number, now: number): string;
|
|
39
|
+
/** "1 regra", "3 regras". */
|
|
40
|
+
export declare const plural: (count: number, one: string, many: string) => string;
|
|
41
|
+
/** The questions a rule can read: the ones with options to choose from. */
|
|
42
|
+
export declare const choiceQuestions: (form: Pick<MetaForm, "questions">) => MetaFormQuestion[];
|
|
43
|
+
/** "Ativo", "Arquivado na Meta"; an unknown status stays raw. */
|
|
44
|
+
export declare const formStatusLabel: (status: string) => string;
|
|
45
|
+
export declare const isArchived: (form: Pick<MetaForm, "status">) => boolean;
|
|
46
|
+
/** A board column by key. */
|
|
47
|
+
export declare const columnOf: (board: FormBoard | undefined, key: string | null) => FormColumn | undefined;
|
|
48
|
+
/** The columns a rule or the entry can pick: all but the discard column. */
|
|
49
|
+
export declare const pickableColumns: (board: FormBoard | undefined) => FormColumn[];
|
|
50
|
+
/** The neutral dot for a column without color, and the discard's. */
|
|
51
|
+
export declare const NO_COLOR = "var(--rastro-muted-fg)";
|
|
52
|
+
export declare const DISCARD_COLOR = "var(--rastro-forms-discard)";
|
|
53
|
+
/**
|
|
54
|
+
* Where a lead goes when no rule matches: the form's entry column, or the
|
|
55
|
+
* board's own door. `door` says it is the board's porta de entrada.
|
|
56
|
+
*/
|
|
57
|
+
export declare function entryOf(board: FormBoard | undefined, entryColumn: string | null): {
|
|
58
|
+
key: string | null;
|
|
59
|
+
name: string;
|
|
60
|
+
color: string;
|
|
61
|
+
door: boolean;
|
|
62
|
+
};
|
|
63
|
+
/** The discard as the board names it: "Descartado" by default. */
|
|
64
|
+
export declare function discardOf(board: FormBoard | undefined): {
|
|
65
|
+
name: string;
|
|
66
|
+
color: string;
|
|
67
|
+
};
|
|
68
|
+
/** A form's state on the list. */
|
|
69
|
+
export type FormState = "active" | "new" | "archived";
|
|
70
|
+
/**
|
|
71
|
+
* What the list shows of a form's rules: the full rules when read (the open
|
|
72
|
+
* drawer's), else the summary `metaForms` carries; undefined while loading,
|
|
73
|
+
* null when unreadable.
|
|
74
|
+
*/
|
|
75
|
+
export declare function rulesSummaryOf(form: Pick<MetaForm, "rules">, rules: FormRules | null | undefined): FormRulesSummary | null | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* `new` only when the host says the form was never configured; rules still
|
|
78
|
+
* loading (undefined) or unreadable (null) are not read as "no rules".
|
|
79
|
+
*/
|
|
80
|
+
export declare function formState(form: MetaForm, rules: Pick<FormRulesSummary, "configured"> | null | undefined): FormState;
|
|
81
|
+
/**
|
|
82
|
+
* The end screen's WhatsApp button: `on` when Meta shows it, `off` when Meta
|
|
83
|
+
* shows it missing, `confirmed` when Meta does not say and the company said
|
|
84
|
+
* it is there ("Já liguei", `whatsappButtonConfirmed`), `unknown` otherwise.
|
|
85
|
+
*/
|
|
86
|
+
export type ButtonState = "on" | "off" | "confirmed" | "unknown";
|
|
87
|
+
export declare function buttonState(form: Pick<MetaForm, "whatsappButton">, confirmed: boolean | null | undefined): ButtonState;
|
|
88
|
+
/**
|
|
89
|
+
* The host's `metaForms` (a site's Pages, each with its forms) as the flat
|
|
90
|
+
* rows the screens read: the Page's id on each form, `createdTime` as
|
|
91
|
+
* `createdAt`. Concatenate the sites' answers before passing them.
|
|
92
|
+
*/
|
|
93
|
+
export declare function metaFormsRows(pages: readonly MetaFormsPage[] | undefined): MetaForm[] | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* A Page's `lastError` as its code: `META_TOKEN_INVALID`, `HANDLER_MISSING`…
|
|
96
|
+
* The component writes the code alone, or the code and a note after a colon
|
|
97
|
+
* (older hosts); either reads the same.
|
|
98
|
+
*/
|
|
99
|
+
export declare function pageErrorCode(lastError: string | null | undefined): string | null;
|
|
100
|
+
/**
|
|
101
|
+
* What a linked Page's status asks of the reader: `reconnect` (only Meta's
|
|
102
|
+
* token or permission refusals: reconnecting fixes them), `host` (the host's
|
|
103
|
+
* own setup holds the leads back, such as its missing form lead handler) or
|
|
104
|
+
* `delay` (Meta is slow or busy; the reconciliation catches up alone).
|
|
105
|
+
*/
|
|
106
|
+
export type PageIssueKind = "reconnect" | "host" | "delay";
|
|
107
|
+
export interface PageIssue {
|
|
108
|
+
kind: PageIssueKind;
|
|
109
|
+
code: string;
|
|
110
|
+
text: string;
|
|
111
|
+
}
|
|
112
|
+
/** Whether the dashboard forwards none of the linked Pages' leads at once. */
|
|
113
|
+
export declare function routeDelayed(pages: readonly MetaPage[]): boolean;
|
|
114
|
+
/**
|
|
115
|
+
* The note a linked Page shows under its name, or null when all is well. A
|
|
116
|
+
* host that says its handler is not ready reads as `HANDLER_MISSING` even
|
|
117
|
+
* before the first reconciliation writes it. The host's own codes come
|
|
118
|
+
* first; a Page whose leads the dashboard cannot forward at once
|
|
119
|
+
* (`routeIssue`) reads as a delay.
|
|
120
|
+
*/
|
|
121
|
+
export declare function pageIssue(page: Pick<MetaPage, "lastError" | "handlerReady" | "routeIssue">, productName?: string): PageIssue | null;
|
|
122
|
+
/**
|
|
123
|
+
* The connection's Pages with what the host's `metaForms` says of each linked
|
|
124
|
+
* one: `handlerReady`, and its `lastError` when the Pages read has none. A
|
|
125
|
+
* Pages read that already carries both keeps its own. A Page another owner
|
|
126
|
+
* linked takes no `lastError` from `metaForms`: its link and token are that
|
|
127
|
+
* owner's, and reconnecting this one's Meta fixes nothing (the Pages read
|
|
128
|
+
* hides it for the same reason).
|
|
129
|
+
*/
|
|
130
|
+
export declare function pagesWithStatus(pages: readonly MetaPage[] | undefined, formsPages: readonly MetaFormsPage[] | undefined): MetaPage[] | undefined;
|
|
131
|
+
/** One form on the list, with what its row says. */
|
|
132
|
+
export interface FormRow {
|
|
133
|
+
form: MetaForm;
|
|
134
|
+
report: FormReportRow | null;
|
|
135
|
+
/** The full rules, when read (the open drawer's). */
|
|
136
|
+
rules: FormRules | null | undefined;
|
|
137
|
+
/** What the list shows: the full rules' or `metaForms`' summary. */
|
|
138
|
+
summary: FormRulesSummary | null | undefined;
|
|
139
|
+
state: FormState;
|
|
140
|
+
isNew: boolean;
|
|
141
|
+
button: ButtonState;
|
|
142
|
+
}
|
|
143
|
+
/** A Page and its forms, for the site it feeds. */
|
|
144
|
+
export interface PageGroup {
|
|
145
|
+
page: MetaPage;
|
|
146
|
+
/** The visible site the Page feeds, or null. */
|
|
147
|
+
site: IntegrationSite | null;
|
|
148
|
+
/** The Page feeds a site the reader cannot see. */
|
|
149
|
+
elsewhere: boolean;
|
|
150
|
+
rows: FormRow[];
|
|
151
|
+
}
|
|
152
|
+
/** The key `formsReport` rows are unique by: the site and the form. */
|
|
153
|
+
export declare const reportKey: (siteId: string, formId: string) => string;
|
|
154
|
+
/** A form's row in the report, for the site its Page feeds. */
|
|
155
|
+
export declare function reportRowOf(report: FormsReport | undefined, siteId: string | null | undefined, formId: string): FormReportRow | null;
|
|
156
|
+
/**
|
|
157
|
+
* Pages in the order Meta lists them, the readable ones first, each with its
|
|
158
|
+
* forms: active ones by leads, then archived ones.
|
|
159
|
+
*/
|
|
160
|
+
export declare function pageGroups({ sites, pages, forms, report, rules, now, }: {
|
|
161
|
+
sites: readonly IntegrationSite[];
|
|
162
|
+
pages: readonly MetaPage[];
|
|
163
|
+
forms: readonly MetaForm[];
|
|
164
|
+
report?: FormsReport | undefined;
|
|
165
|
+
rules?: Record<string, FormRules | null | undefined> | undefined;
|
|
166
|
+
now: number;
|
|
167
|
+
}): PageGroup[];
|
|
168
|
+
/** A form's leads in 30 days: the report's count, or the host's own. */
|
|
169
|
+
export declare const formLeads: (row: Pick<FormRow, "form" | "report">) => number;
|
|
170
|
+
/** "30 dias: 86 leads · 14 descartados". */
|
|
171
|
+
export declare function formsSummary(report: FormsReport | undefined, forms?: readonly Pick<MetaForm, "lastLeadAt">[]): {
|
|
172
|
+
leads: number;
|
|
173
|
+
discarded: number;
|
|
174
|
+
lastLeadAt: number | null;
|
|
175
|
+
partial: boolean;
|
|
176
|
+
} | null;
|
|
177
|
+
/** A slice of the simulation bar. */
|
|
178
|
+
export interface SimulationSegment {
|
|
179
|
+
key: string;
|
|
180
|
+
label: string;
|
|
181
|
+
color: string;
|
|
182
|
+
count: number;
|
|
183
|
+
discard: boolean;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* The simulation as the bar draws it: the entry first, then the columns the
|
|
187
|
+
* rules send to (in rule order), the other columns in board order, then the
|
|
188
|
+
* discard (every reason together); empty ones left out.
|
|
189
|
+
*/
|
|
190
|
+
export declare function simulationSegments(simulation: FormRulesSimulation, board: FormBoard | undefined, entryColumn: string | null, rules?: readonly FormRule[]): SimulationSegment[];
|
|
191
|
+
/** The suggested first message for a form that has none yet. */
|
|
192
|
+
export declare function defaultFirstContactText(siteName: string, formName: string): string;
|
|
193
|
+
/** The text in pieces: plain runs and the first name's variable. */
|
|
194
|
+
export declare function templateParts(text: string): {
|
|
195
|
+
kind: "text" | "first_name";
|
|
196
|
+
text: string;
|
|
197
|
+
}[];
|
|
198
|
+
/** The text a lead receives: the variable filled with the first name. */
|
|
199
|
+
export declare const fillTemplate: (text: string, firstName: string) => string;
|
|
200
|
+
/** A rule in the drawer: the stored one plus what the screen tracks. */
|
|
201
|
+
export interface DraftRule extends FormRule {
|
|
202
|
+
/** Stable while the list reorders. */
|
|
203
|
+
id: string;
|
|
204
|
+
/** The stored rule's count, kept until the rule changes. */
|
|
205
|
+
monthCount: number | null;
|
|
206
|
+
/** Added in this edit: "nova" instead of a count. */
|
|
207
|
+
fresh: boolean;
|
|
208
|
+
}
|
|
209
|
+
export interface Draft {
|
|
210
|
+
entryColumn: string | null;
|
|
211
|
+
rules: DraftRule[];
|
|
212
|
+
firstContact: FirstContact;
|
|
213
|
+
/** "Já liguei": the company set the end screen's button by hand. */
|
|
214
|
+
whatsappButtonConfirmed: boolean;
|
|
215
|
+
}
|
|
216
|
+
export declare const nextRuleId: () => string;
|
|
217
|
+
/** The drawer's starting point: the stored rules, or a fresh form's. */
|
|
218
|
+
export declare function draftOf(rules: FormRules | null | undefined, form: MetaForm, site: Pick<IntegrationSite, "name">): Draft;
|
|
219
|
+
/** What `setFormRules` takes from a draft. */
|
|
220
|
+
export declare function choiceOf(draft: Draft): FormRulesChoice;
|
|
221
|
+
/**
|
|
222
|
+
* What the simulation reads from a draft: the entry and the complete rules
|
|
223
|
+
* (a rule still being written decides nothing yet). The first contact stays
|
|
224
|
+
* out, so editing its text never asks for another 30-day scan.
|
|
225
|
+
*/
|
|
226
|
+
export declare function simulationDraftOf(draft: Pick<Draft, "entryColumn" | "rules">, questions: readonly MetaFormQuestion[], board: FormBoard | undefined): FormRulesDraft;
|
|
227
|
+
/** Why a rule cannot be saved yet, in pt-BR; null when it can. */
|
|
228
|
+
export declare function ruleProblem(rule: FormRule, questions: readonly MetaFormQuestion[], board: FormBoard | undefined): string | null;
|
|
229
|
+
/** Whether the draft can go to `setFormRules`. */
|
|
230
|
+
export declare function draftProblem(draft: Draft, form: MetaForm, board: FormBoard | undefined): string | null;
|
|
231
|
+
/** The option labels a rule picked, in the question's order. */
|
|
232
|
+
export declare function answerLabels(question: MetaFormQuestion | undefined, answers: readonly string[]): string[];
|
|
233
|
+
/** Meta's page for the Page's forms (Meta Business Suite's forms library). */
|
|
234
|
+
export declare const metaFormsUrl: (form: Pick<MetaForm, "pageId">) => string;
|
|
235
|
+
/** The column a lead's decision names, for a card or a path. */
|
|
236
|
+
export declare function columnName(board: FormBoard | undefined, key: string): string;
|
|
237
|
+
/** A column's color, or the neutral dot. */
|
|
238
|
+
export declare const colorOf: (column: FormColumn | undefined) => string;
|
|
239
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/ui/forms/model.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,aAAa,EACb,QAAQ,EACR,SAAS,EACT,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACT,MAAM,YAAY,CAAC;AAOpB,0EAA0E;AAC1E,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,0EAA0E;AAC1E,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,sDAAsD;AACtD,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,4CAA4C;AAC5C,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAI1C,uDAAuD;AACvD,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AAErD,mEAAmE;AACnE,eAAO,MAAM,cAAc,EAAE,kBAI5B,CAAC;AACF,iEAAiE;AACjE,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,YAAY,YAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAU,CAAC;AACvD,eAAO,MAAM,gBAAgB,YAAI,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAU,CAAC;AACzD;;;GAGG;AACH,eAAO,MAAM,qBAAqB,uBAAuB,CAAC;AAa1D,sEAAsE;AACtE,eAAO,MAAM,UAAU,OAAQ,MAAM,WAAqB,CAAC;AAE3D,8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