@oondemand/oon-core-front 0.7.13 → 0.7.16

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 CHANGED
@@ -7,3 +7,22 @@ Para criar ou alterar um App, comece pela entrada curta distribuída pelo gerado
7
7
  `runtimeMode: "local"` troca o bootstrap de uso único por cookie HttpOnly, usa CSRF nas mutações, não persiste bearer no `localStorage`, reconhece `ativa_local` e exibe o banner de desenvolvimento desconectado com expiração e seleção dos perfis declarados no manifesto.
8
8
 
9
9
  O frontend inclui a rota pública `/ativacao` e um `ActivationProvider` que consulta `/ativacao/status` antes de liberar rotas privadas. Centrais `member` não ativas são enviadas para o assistente de ativação; estados `suspensa` e `revogada` usam páginas próprias. O código de ativação fica apenas em memória e é limpo após conclusão.
10
+
11
+
12
+ ## Kit de telas (Onda UX)
13
+
14
+ Regras: uma tarefa por tela; lista → detalhe em painel lateral; uma ação principal; status com o vocabulário único; dados técnicos só em "Detalhes técnicos" (oon-docs, doc 20).
15
+
16
+ ```tsx
17
+ import { CorePageHeader, CoreKpiGrid, CoreDataTable, CoreDetailDrawer, CoreStatusBadge, CoreTechnicalDetails } from "@oondemand/oon-core-front";
18
+
19
+ <CorePageHeader title="Publicações" description="Acompanhe e destrave publicações." />
20
+ <CoreDataTable label="Publicações" rows={rows} rowKey={(r) => r.id} onRowClick={setSelected} selectedKey={selected?.id}
21
+ search={{ value: q, onChange: setQ, placeholder: "Buscar App" }}
22
+ columns={[{ key: "app", header: "App" }, { key: "etapa", header: "Status", render: (r) => <CoreStatusBadge kind="publication" status={r.etapa} /> }]} />
23
+ <CoreDetailDrawer open={!!selected} onClose={() => setSelected(null)} title={selected?.app} actions={<Button>Executar recuperação</Button>}>
24
+ <CoreTechnicalDetails items={[{ label: "Release", value: selected?.releaseId }]} />
25
+ </CoreDetailDrawer>
26
+ ```
27
+
28
+ Menu: `section` agrupa, `order` ordena e `requires` liga o item a uma condição de `registry.menuConditions` (hook). Cabeçalho: `registry.layoutSlots.organization` recebe o seletor de organização (`CoreOrganizationSwitcher`); um item de menu com `action: "profile"` aparece em "Meu perfil".
@@ -7,8 +7,9 @@ import {
7
7
  CoreTransactionalEmail,
8
8
  CoreUsersAccess,
9
9
  MissingRenderer,
10
+ coreInitials,
10
11
  resolveComponent
11
- } from "./chunk-EIFIGMY7.js";
12
+ } from "./chunk-TWOOUSQ6.js";
12
13
  import {
13
14
  OON_RESERVED_ROUTES,
14
15
  defineOonNavigation,
@@ -589,7 +590,8 @@ import {
589
590
  } from "react-router-dom";
590
591
 
591
592
  // src/shell/DefaultShell.tsx
592
- import { Box as Box5, Button as Button3, Flex as Flex4, Spacer, Text as Text5 } from "@chakra-ui/react";
593
+ import { Box as Box5, Button as Button3, Drawer, Flex as Flex4, IconButton, Image as Image2, Menu, Portal, Spacer, Text as Text5 } from "@chakra-ui/react";
594
+ import { useState as useState6 } from "react";
593
595
  import { Outlet, useNavigate } from "react-router-dom";
594
596
 
595
597
  // src/shell/Sidebar.tsx
@@ -599,7 +601,8 @@ import { NavLink } from "react-router-dom";
599
601
  import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
600
602
  function groupBySection(items) {
601
603
  const groups = /* @__PURE__ */ new Map();
602
- for (const item of items) {
604
+ const ordered = items.map((item, index) => ({ item, index })).sort((a, b) => (a.item.order ?? Number.MAX_SAFE_INTEGER) - (b.item.order ?? Number.MAX_SAFE_INTEGER) || a.index - b.index).map(({ item }) => item);
605
+ for (const item of ordered) {
603
606
  const section = item.section ?? "Geral";
604
607
  if (!groups.has(section)) groups.set(section, []);
605
608
  groups.get(section).push(item);
@@ -680,14 +683,74 @@ function PlatformAppMenuItem({ item, appCode }) {
680
683
  launchError ? /* @__PURE__ */ jsx7(Text4, { role: "alert", px: 3, py: 1, fontSize: "10px", color: "red.600", children: launchError }) : null
681
684
  ] });
682
685
  }
683
- function Sidebar({ app, menu, registry }) {
686
+ function useMenuConditions(registry) {
687
+ const entries = Object.entries(registry?.menuConditions ?? {}).sort(([a], [b]) => a.localeCompare(b));
688
+ const result = {};
689
+ for (const [name, useCondition] of entries) result[name] = useCondition();
690
+ return result;
691
+ }
692
+ function useVisibleMenu(menu, registry) {
684
693
  const { hasPermission } = useOonAuth();
685
- const visible = menu.filter((item) => !item.hidden && hasPermission(item.permissions));
694
+ const conditions = useMenuConditions(registry);
695
+ return menu.filter((item) => !item.hidden && hasPermission(item.permissions) && (!item.requires || conditions[item.requires] === true));
696
+ }
697
+ function SidebarNav({ menu, registry, onNavigate, compact = false }) {
698
+ const visible = useVisibleMenu(menu, registry);
699
+ return /* @__PURE__ */ jsx7(Stack, { gap: 5, children: groupBySection(visible).map(([section, items]) => /* @__PURE__ */ jsxs5(Stack, { gap: 1, role: "group", "aria-label": section, children: [
700
+ /* @__PURE__ */ jsx7(
701
+ Text4,
702
+ {
703
+ display: compact ? { base: "none", lg: "block" } : "block",
704
+ fontSize: "10px",
705
+ fontWeight: "600",
706
+ color: "gray.500",
707
+ textTransform: "uppercase",
708
+ letterSpacing: "0.08em",
709
+ px: 3,
710
+ mb: 1,
711
+ children: section
712
+ }
713
+ ),
714
+ items.map((item) => {
715
+ const CustomMenuItem = resolveComponent(registry, item.renderer, "menuRenderers");
716
+ if (CustomMenuItem) return /* @__PURE__ */ jsx7(CustomMenuItem, { item }, item.href);
717
+ const appCode = launchAppCode(item.action);
718
+ if (appCode) return /* @__PURE__ */ jsx7(PlatformAppMenuItem, { item, appCode }, item.href);
719
+ return /* @__PURE__ */ jsx7(NavLink, { to: item.href, end: item.href === "/", title: item.label, onClick: onNavigate, children: ({ isActive }) => /* @__PURE__ */ jsxs5(
720
+ Flex3,
721
+ {
722
+ align: "center",
723
+ gap: 3,
724
+ px: 3,
725
+ py: "10px",
726
+ borderRadius: "9px",
727
+ fontSize: "14px",
728
+ fontWeight: isActive ? "600" : "500",
729
+ bg: isActive ? "brand.50" : "transparent",
730
+ color: isActive ? "brand.700" : "#374151",
731
+ borderLeftWidth: "3px",
732
+ borderLeftColor: isActive ? "brand.500" : "transparent",
733
+ transition: "all 0.15s ease",
734
+ _hover: { bg: isActive ? "brand.50" : "#F8F9FA", color: "brand.700" },
735
+ "aria-current": isActive ? "page" : void 0,
736
+ children: [
737
+ item.icon ? /* @__PURE__ */ jsx7(Box4, { flex: "0 0 auto", children: item.icon }) : null,
738
+ /* @__PURE__ */ jsx7(Text4, { lineClamp: 1, children: item.label }),
739
+ item.badge !== void 0 ? /* @__PURE__ */ jsx7(Box4, { ml: "auto", fontSize: "xs", fontWeight: "700", color: "brand.700", children: item.badge }) : null
740
+ ]
741
+ }
742
+ ) }, item.href);
743
+ })
744
+ ] }, section)) });
745
+ }
746
+ function Sidebar({ app, menu, registry }) {
686
747
  return /* @__PURE__ */ jsxs5(
687
748
  Box4,
688
749
  {
689
750
  as: "nav",
690
- w: { base: "76px", lg: "248px" },
751
+ "aria-label": "Menu principal",
752
+ w: "248px",
753
+ display: { base: "none", lg: "block" },
691
754
  minH: "100vh",
692
755
  borderRightWidth: "1px",
693
756
  borderColor: "#E8ECEF",
@@ -716,56 +779,12 @@ function Sidebar({ app, menu, registry }) {
716
779
  children: "O"
717
780
  }
718
781
  ),
719
- /* @__PURE__ */ jsxs5(Box4, { display: { base: "none", lg: "block" }, minW: 0, children: [
782
+ /* @__PURE__ */ jsxs5(Box4, { minW: 0, children: [
720
783
  /* @__PURE__ */ jsx7(Text4, { fontWeight: "700", fontSize: "sm", color: "#07262E", lineClamp: 1, children: app.name }),
721
784
  /* @__PURE__ */ jsx7(Text4, { fontSize: "10px", color: "gray.500", textTransform: "uppercase", letterSpacing: "0.08em", children: "Opera\xE7\xE3o digital" })
722
785
  ] })
723
786
  ] }),
724
- /* @__PURE__ */ jsx7(Stack, { gap: 5, children: groupBySection(visible).map(([section, items]) => /* @__PURE__ */ jsxs5(Stack, { gap: 1, children: [
725
- /* @__PURE__ */ jsx7(
726
- Text4,
727
- {
728
- display: { base: "none", lg: "block" },
729
- fontSize: "10px",
730
- fontWeight: "600",
731
- color: "gray.400",
732
- textTransform: "uppercase",
733
- letterSpacing: "0.08em",
734
- px: 3,
735
- mb: 1,
736
- children: section
737
- }
738
- ),
739
- items.map((item) => {
740
- const CustomMenuItem = resolveComponent(registry, item.renderer, "menuRenderers");
741
- if (CustomMenuItem) return /* @__PURE__ */ jsx7(CustomMenuItem, { item }, item.href);
742
- const appCode = launchAppCode(item.action);
743
- if (appCode) return /* @__PURE__ */ jsx7(PlatformAppMenuItem, { item, appCode }, item.href);
744
- return /* @__PURE__ */ jsx7(NavLink, { to: item.href, end: item.href === "/", title: item.label, children: ({ isActive }) => /* @__PURE__ */ jsxs5(
745
- Flex3,
746
- {
747
- align: "center",
748
- justify: { base: "center", lg: "flex-start" },
749
- gap: 3,
750
- px: { base: 2, lg: 3 },
751
- py: "10px",
752
- borderRadius: "9px",
753
- fontSize: "13px",
754
- fontWeight: isActive ? "600" : "500",
755
- bg: isActive ? "brand.50" : "transparent",
756
- color: isActive ? "brand.700" : "#46545C",
757
- borderLeftWidth: "3px",
758
- borderLeftColor: isActive ? "brand.500" : "transparent",
759
- transition: "all 0.15s ease",
760
- _hover: { bg: isActive ? "brand.50" : "#F8F9FA", color: "brand.700" },
761
- children: [
762
- item.icon ? /* @__PURE__ */ jsx7(Box4, { flex: "0 0 auto", children: item.icon }) : /* @__PURE__ */ jsx7(Box4, { w: "7px", h: "7px", borderRadius: "full", bg: isActive ? "brand.500" : "gray.300" }),
763
- /* @__PURE__ */ jsx7(Text4, { display: { base: "none", lg: "block" }, lineClamp: 1, children: item.label })
764
- ]
765
- }
766
- ) }, item.href);
767
- })
768
- ] }, section)) })
787
+ /* @__PURE__ */ jsx7(SidebarNav, { menu, registry })
769
788
  ]
770
789
  }
771
790
  );
@@ -774,7 +793,7 @@ function Sidebar({ app, menu, registry }) {
774
793
  // package.json
775
794
  var package_default = {
776
795
  name: "@oondemand/oon-core-front",
777
- version: "0.7.13",
796
+ version: "0.7.16",
778
797
  repository: {
779
798
  type: "git",
780
799
  url: "git+https://github.com/oondemand/oon-platform.git",
@@ -956,7 +975,23 @@ function resolveSettingsHref(menu) {
956
975
  if (settingsPage) return settingsPage.href;
957
976
  return null;
958
977
  }
959
- function CoreTopbar({ app, menu }) {
978
+ function MenuIcon() {
979
+ return /* @__PURE__ */ jsx8("svg", { "aria-hidden": "true", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx8("path", { d: "M4 6h16M4 12h16M4 18h16", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round" }) });
980
+ }
981
+ function MobileMenu({ app, menu, registry }) {
982
+ const [open, setOpen] = useState6(false);
983
+ return /* @__PURE__ */ jsxs6(Box5, { display: { base: "block", lg: "none" }, mr: 3, children: [
984
+ /* @__PURE__ */ jsx8(IconButton, { "aria-label": "Abrir menu", variant: "ghost", onClick: () => setOpen(true), children: /* @__PURE__ */ jsx8(MenuIcon, {}) }),
985
+ /* @__PURE__ */ jsx8(Drawer.Root, { open, onOpenChange: (event) => setOpen(event.open), placement: "start", size: "xs", children: /* @__PURE__ */ jsxs6(Portal, { children: [
986
+ /* @__PURE__ */ jsx8(Drawer.Backdrop, {}),
987
+ /* @__PURE__ */ jsx8(Drawer.Positioner, { children: /* @__PURE__ */ jsxs6(Drawer.Content, { children: [
988
+ /* @__PURE__ */ jsx8(Drawer.Header, { children: /* @__PURE__ */ jsx8(Drawer.Title, { children: app.title ?? app.name }) }),
989
+ /* @__PURE__ */ jsx8(Drawer.Body, { px: 2, children: /* @__PURE__ */ jsx8(Box5, { as: "nav", "aria-label": "Menu principal", children: /* @__PURE__ */ jsx8(SidebarNav, { menu, registry, onNavigate: () => setOpen(false) }) }) })
990
+ ] }) })
991
+ ] }) })
992
+ ] });
993
+ }
994
+ function CoreTopbar({ app, menu, registry }) {
960
995
  const { user, logout, hasPermission } = useOonAuth();
961
996
  const navigate = useNavigate();
962
997
  const metadataQuery = useCoreMetadata();
@@ -984,6 +1019,9 @@ function CoreTopbar({ app, menu }) {
984
1019
  const settingsHref = resolveSettingsHref(
985
1020
  menu.filter((item) => hasPermission(item.permissions))
986
1021
  );
1022
+ const profileHref = menu.find((item) => item.action === "profile")?.href ?? null;
1023
+ const OrganizationSlot = registry?.layoutSlots?.organization;
1024
+ const avatar = user?.fotoPerfilUrl;
987
1025
  const tenant = user?.tenant;
988
1026
  const tenantLabel = String(tenant?.nome || tenant?.slug || "").trim();
989
1027
  return /* @__PURE__ */ jsxs6(
@@ -1002,7 +1040,9 @@ function CoreTopbar({ app, menu }) {
1002
1040
  top: 0,
1003
1041
  zIndex: 10,
1004
1042
  children: [
1005
- /* @__PURE__ */ jsxs6(Box5, { minW: 0, title: details, children: [
1043
+ /* @__PURE__ */ jsx8(MobileMenu, { app, menu, registry }),
1044
+ /* @__PURE__ */ jsxs6(Box5, { minW: 0, title: `${versionParts.join(" \xB7 ")}
1045
+ ${details}`, children: [
1006
1046
  /* @__PURE__ */ jsx8(
1007
1047
  Text5,
1008
1048
  {
@@ -1018,10 +1058,10 @@ function CoreTopbar({ app, menu }) {
1018
1058
  tenantLabel ? /* @__PURE__ */ jsxs6(Text5, { fontSize: "xs", fontWeight: "600", color: "brand.fg", lineHeight: "1.4", children: [
1019
1059
  "Tenant: ",
1020
1060
  tenantLabel
1021
- ] }) : null,
1022
- /* @__PURE__ */ jsx8(Text5, { fontSize: "10px", color: "text.muted", lineHeight: "1.35", children: versionParts.join(" \xB7 ") })
1061
+ ] }) : null
1023
1062
  ] }),
1024
1063
  /* @__PURE__ */ jsx8(Spacer, {}),
1064
+ OrganizationSlot ? /* @__PURE__ */ jsx8(Box5, { mr: 3, children: /* @__PURE__ */ jsx8(OrganizationSlot, { app, menu }) }) : null,
1025
1065
  user ? /* @__PURE__ */ jsxs6(Flex4, { align: "center", gap: 3, children: [
1026
1066
  /* @__PURE__ */ jsxs6(Box5, { textAlign: "right", display: { base: "none", md: "block" }, children: [
1027
1067
  /* @__PURE__ */ jsx8(Text5, { fontSize: "sm", fontWeight: "600", color: "text.primary", children: user.nome }),
@@ -1042,17 +1082,13 @@ function CoreTopbar({ app, menu }) {
1042
1082
  children: /* @__PURE__ */ jsx8(SettingsIcon, {})
1043
1083
  }
1044
1084
  ) : null,
1045
- /* @__PURE__ */ jsx8(
1046
- Button3,
1047
- {
1048
- size: "sm",
1049
- variant: "outline",
1050
- colorPalette: "brand",
1051
- borderRadius: "8px",
1052
- onClick: logout,
1053
- children: "Sair"
1054
- }
1055
- )
1085
+ /* @__PURE__ */ jsxs6(Menu.Root, { positioning: { placement: "bottom-end" }, children: [
1086
+ /* @__PURE__ */ jsx8(Menu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx8(Button3, { size: "sm", variant: "ghost", borderRadius: "full", px: 1, "aria-label": "Abrir menu do usu\xE1rio", children: avatar ? /* @__PURE__ */ jsx8(Image2, { src: avatar, alt: "", boxSize: "32px", borderRadius: "full", objectFit: "cover" }) : /* @__PURE__ */ jsx8(Flex4, { boxSize: "32px", borderRadius: "full", bg: "brand.100", color: "brand.700", align: "center", justify: "center", fontWeight: "700", fontSize: "xs", children: coreInitials(user.nome) }) }) }),
1087
+ /* @__PURE__ */ jsx8(Portal, { children: /* @__PURE__ */ jsx8(Menu.Positioner, { children: /* @__PURE__ */ jsxs6(Menu.Content, { children: [
1088
+ profileHref ? /* @__PURE__ */ jsx8(Menu.Item, { value: "perfil", onClick: () => navigate(profileHref), children: "Meu perfil" }) : null,
1089
+ /* @__PURE__ */ jsx8(Menu.Item, { value: "sair", onClick: logout, children: "Sair" })
1090
+ ] }) }) })
1091
+ ] })
1056
1092
  ] }) : null
1057
1093
  ]
1058
1094
  }
@@ -1071,7 +1107,7 @@ function Slot({
1071
1107
  return Component ? /* @__PURE__ */ jsx8(Component, { app, menu }) : /* @__PURE__ */ jsx8(MissingRenderer, { renderer: slot });
1072
1108
  }
1073
1109
  if (name === "sidebar") return /* @__PURE__ */ jsx8(Sidebar, { app, menu, registry });
1074
- if (name === "topbar") return /* @__PURE__ */ jsx8(CoreTopbar, { app, menu });
1110
+ if (name === "topbar") return /* @__PURE__ */ jsx8(CoreTopbar, { app, menu, registry });
1075
1111
  if (name === "footer" && slot === "core") {
1076
1112
  return /* @__PURE__ */ jsx8(Box5, { as: "footer", px: 6, py: 4, color: "gray.500", fontSize: "xs", borderTopWidth: "1px", children: "OonCore" });
1077
1113
  }
@@ -1244,7 +1280,7 @@ function AppAccessGuard({ children }) {
1244
1280
  }
1245
1281
 
1246
1282
  // src/security/LoginPage.tsx
1247
- import { useState as useState6 } from "react";
1283
+ import { useState as useState7 } from "react";
1248
1284
  import { Box as Box7, Button as Button5, Flex as Flex6, Heading as Heading4, Input as Input3, SimpleGrid, Text as Text7, VStack as VStack4 } from "@chakra-ui/react";
1249
1285
  import { Link as Link2, Navigate as Navigate2, useLocation as useLocation4 } from "react-router-dom";
1250
1286
  import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
@@ -1275,13 +1311,13 @@ function tenantUrl(path, tenantId) {
1275
1311
  function LoginPage({ app, onboardingEnabled = false }) {
1276
1312
  const { status, login } = useOonAuth();
1277
1313
  const location = useLocation4();
1278
- const [email, setEmail] = useState6("");
1279
- const [password, setPassword] = useState6("");
1280
- const [submitting, setSubmitting] = useState6(false);
1281
- const [message, setMessage] = useState6(null);
1282
- const [tenants, setTenants] = useState6([]);
1283
- const [selectorMode, setSelectorMode] = useState6(false);
1284
- const [openingTenant, setOpeningTenant] = useState6(null);
1314
+ const [email, setEmail] = useState7("");
1315
+ const [password, setPassword] = useState7("");
1316
+ const [submitting, setSubmitting] = useState7(false);
1317
+ const [message, setMessage] = useState7(null);
1318
+ const [tenants, setTenants] = useState7([]);
1319
+ const [selectorMode, setSelectorMode] = useState7(false);
1320
+ const [openingTenant, setOpeningTenant] = useState7(null);
1285
1321
  const redirect = safeRedirect(location.search);
1286
1322
  if (status === "authenticated" && !selectorMode) return /* @__PURE__ */ jsx12(Navigate2, { to: redirect, replace: true });
1287
1323
  if (status === "forbidden") return /* @__PURE__ */ jsx12(Navigate2, { to: "/acesso-negado", replace: true });
@@ -1369,16 +1405,16 @@ function LoginPage({ app, onboardingEnabled = false }) {
1369
1405
  }
1370
1406
 
1371
1407
  // src/security/FirstAccessPage.tsx
1372
- import { useState as useState7 } from "react";
1408
+ import { useState as useState8 } from "react";
1373
1409
  import { Box as Box8, Button as Button6, Flex as Flex7, Heading as Heading5, Input as Input4, Text as Text8, VStack as VStack5 } from "@chakra-ui/react";
1374
1410
  import { Navigate as Navigate3 } from "react-router-dom";
1375
1411
  import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
1376
1412
  function FirstAccessPage() {
1377
1413
  const { status, completeFirstAccess } = useOonAuth();
1378
- const [password, setPassword] = useState7("");
1379
- const [confirm, setConfirm] = useState7("");
1380
- const [submitting, setSubmitting] = useState7(false);
1381
- const [message, setMessage] = useState7(null);
1414
+ const [password, setPassword] = useState8("");
1415
+ const [confirm, setConfirm] = useState8("");
1416
+ const [submitting, setSubmitting] = useState8(false);
1417
+ const [message, setMessage] = useState8(null);
1382
1418
  if (status === "authenticated") return /* @__PURE__ */ jsx13(Navigate3, { to: "/", replace: true });
1383
1419
  if (status === "unauthenticated") return /* @__PURE__ */ jsx13(Navigate3, { to: "/login", replace: true });
1384
1420
  if (status === "forbidden") return /* @__PURE__ */ jsx13(Navigate3, { to: "/acesso-negado", replace: true });
@@ -1422,7 +1458,7 @@ function FirstAccessPage() {
1422
1458
  }
1423
1459
 
1424
1460
  // src/security/ActivationPage.tsx
1425
- import { useEffect as useEffect5, useState as useState8 } from "react";
1461
+ import { useEffect as useEffect5, useState as useState9 } from "react";
1426
1462
  import { Box as Box9, Button as Button7, Heading as Heading6, Input as Input5, Text as Text9, VStack as VStack6 } from "@chakra-ui/react";
1427
1463
  import { Fragment as Fragment4, jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
1428
1464
  function encodeBasicCredentials(email, password) {
@@ -1434,21 +1470,21 @@ function encodeBasicCredentials(email, password) {
1434
1470
  function ActivationPage() {
1435
1471
  const { http } = useOonApi();
1436
1472
  const activation = useActivation();
1437
- const [step, setStep] = useState8(1);
1438
- const [config, setConfig] = useState8(null);
1439
- const [code, setCode] = useState8("");
1440
- const [preview, setPreview] = useState8(null);
1441
- const [global, setGlobal] = useState8({});
1442
- const [app, setApp] = useState8({});
1443
- const [rootEmail, setRootEmail] = useState8("");
1444
- const [rootPassword, setRootPassword] = useState8("");
1445
- const [devName, setDevName] = useState8("");
1446
- const [devEmail, setDevEmail] = useState8("");
1447
- const [devPassword, setDevPassword] = useState8("");
1448
- const [showCodeFlow, setShowCodeFlow] = useState8(false);
1449
- const [devResult, setDevResult] = useState8(null);
1450
- const [error, setError] = useState8(null);
1451
- const [submitting, setSubmitting] = useState8(false);
1473
+ const [step, setStep] = useState9(1);
1474
+ const [config, setConfig] = useState9(null);
1475
+ const [code, setCode] = useState9("");
1476
+ const [preview, setPreview] = useState9(null);
1477
+ const [global, setGlobal] = useState9({});
1478
+ const [app, setApp] = useState9({});
1479
+ const [rootEmail, setRootEmail] = useState9("");
1480
+ const [rootPassword, setRootPassword] = useState9("");
1481
+ const [devName, setDevName] = useState9("");
1482
+ const [devEmail, setDevEmail] = useState9("");
1483
+ const [devPassword, setDevPassword] = useState9("");
1484
+ const [showCodeFlow, setShowCodeFlow] = useState9(false);
1485
+ const [devResult, setDevResult] = useState9(null);
1486
+ const [error, setError] = useState9(null);
1487
+ const [submitting, setSubmitting] = useState9(false);
1452
1488
  useEffect5(() => {
1453
1489
  http.get("/ativacao/configuracao").then((response) => {
1454
1490
  setConfig(response.data);
@@ -2167,4 +2203,4 @@ export {
2167
2203
  appDefinitionToConfig,
2168
2204
  startOonApp
2169
2205
  };
2170
- //# sourceMappingURL=chunk-VR2YOC4S.js.map
2206
+ //# sourceMappingURL=chunk-BPMQTIXF.js.map