@oondemand/oon-core-front 0.3.36 → 0.3.37

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/index.js CHANGED
@@ -642,7 +642,7 @@ function OonProviders({ config, http, storage, children }) {
642
642
 
643
643
  // src/components/CoreCollection.tsx
644
644
  import { useState as useState10 } from "react";
645
- import { Box as Box9, Heading as Heading4, Stack as Stack4, Text as Text11 } from "@chakra-ui/react";
645
+ import { Box as Box10, Heading as Heading4, Stack as Stack4, Text as Text11 } from "@chakra-ui/react";
646
646
  import { useMutation as useMutation2, useQueryClient as useQueryClient3 } from "@tanstack/react-query";
647
647
 
648
648
  // src/components/internal/fieldUtils.ts
@@ -1833,12 +1833,12 @@ function DynamicForm({ title, eyebrow = "Cadastro", fields, initialValues, submi
1833
1833
 
1834
1834
  // src/components/internal/CoreDetailModal.tsx
1835
1835
  import { useEffect as useEffect6, useMemo as useMemo7, useState as useState9 } from "react";
1836
- import { Box as Box8, Button as Button8, Flex as Flex7, Heading as Heading3, IconButton, Text as Text10 } from "@chakra-ui/react";
1836
+ import { Box as Box9, Button as Button8, Flex as Flex7, Heading as Heading3, IconButton, Text as Text10 } from "@chakra-ui/react";
1837
1837
  import { useQuery as useQuery6, useQueryClient as useQueryClient2 } from "@tanstack/react-query";
1838
1838
 
1839
1839
  // src/components/internal/CoreTabbedDetail.tsx
1840
1840
  import { useEffect as useEffect5, useMemo as useMemo6, useState as useState8 } from "react";
1841
- import { Box as Box7, Button as Button7, Flex as Flex6, Input as Input5, NativeSelect as NativeSelect4, SimpleGrid as SimpleGrid3, Stack as Stack3, Text as Text9, Textarea as Textarea3 } from "@chakra-ui/react";
1841
+ import { Box as Box8, Button as Button7, Flex as Flex6, Input as Input5, NativeSelect as NativeSelect4, SimpleGrid as SimpleGrid3, Stack as Stack3, Text as Text9, Textarea as Textarea3 } from "@chakra-ui/react";
1842
1842
 
1843
1843
  // src/components/internal/CoreSummaryCards.tsx
1844
1844
  import { SimpleGrid as SimpleGrid2, Box as Box5, Text as Text6, Badge as Badge2 } from "@chakra-ui/react";
@@ -1894,7 +1894,7 @@ function CoreSummaryCards({ cards = [], parent, relations }) {
1894
1894
 
1895
1895
  // src/components/internal/CoreRelatedGrid.tsx
1896
1896
  import { useMemo as useMemo5, useState as useState7 } from "react";
1897
- import { Badge as Badge3, Box as Box6, Button as Button6, Flex as Flex5, Table as Table2, Text as Text8 } from "@chakra-ui/react";
1897
+ import { Badge as Badge3, Box as Box7, Button as Button6, Flex as Flex5, Table as Table2, Text as Text8 } from "@chakra-ui/react";
1898
1898
  import { useMutation, useQuery as useQuery5, useQueryClient } from "@tanstack/react-query";
1899
1899
 
1900
1900
  // src/components/internal/CoreInlineEditableCell.tsx
@@ -1944,7 +1944,60 @@ function CoreInlineEditableCell({ column, meta, value, onChange }) {
1944
1944
 
1945
1945
  // src/components/internal/CoreRowAction.tsx
1946
1946
  import { useState as useState6 } from "react";
1947
- import { Button as Button5, Text as Text7 } from "@chakra-ui/react";
1947
+ import { Box as Box6, Button as Button5, Text as Text7 } from "@chakra-ui/react";
1948
+
1949
+ // src/components/internal/actionError.ts
1950
+ function asRecord(value) {
1951
+ return value && typeof value === "object" ? value : void 0;
1952
+ }
1953
+ function firstText(...values) {
1954
+ return values.find((value) => typeof value === "string" && value.trim().length > 0)?.trim();
1955
+ }
1956
+ function firstNumber(...values) {
1957
+ return values.find((value) => typeof value === "number" && Number.isFinite(value));
1958
+ }
1959
+ function collectDetailMessages(value, visited = /* @__PURE__ */ new WeakSet(), depth = 0) {
1960
+ if (depth > 4 || value == null) return [];
1961
+ if (typeof value === "string") return value.trim() ? [value.trim()] : [];
1962
+ if (Array.isArray(value)) {
1963
+ return value.flatMap((item) => collectDetailMessages(item, visited, depth + 1));
1964
+ }
1965
+ if (typeof value !== "object" || visited.has(value)) return [];
1966
+ visited.add(value);
1967
+ const record = value;
1968
+ const field = firstText(record.field, record.path, record.property, record.name);
1969
+ const message = firstText(record.message, record.msg, record.reason);
1970
+ const direct = message ? [field ? `${field}: ${message}` : message] : [];
1971
+ const nestedKeys = ["details", "errors", "validation", "fields"];
1972
+ const nested = nestedKeys.flatMap((key) => collectDetailMessages(record[key], visited, depth + 1));
1973
+ if (direct.length || nested.length) return [...direct, ...nested];
1974
+ return Object.entries(record).filter(([key]) => !["code", "status", "statusCode", "requestId"].includes(key)).flatMap(([, nestedValue]) => collectDetailMessages(nestedValue, visited, depth + 1));
1975
+ }
1976
+ function unique(values) {
1977
+ return [...new Set(values.map((value) => value.trim()).filter(Boolean))];
1978
+ }
1979
+ function describeActionError(error) {
1980
+ if (error instanceof Error) return { message: error.message };
1981
+ if (typeof error === "string") return { message: error };
1982
+ const record = asRecord(error);
1983
+ if (!record) return { message: "N\xE3o foi poss\xEDvel executar a a\xE7\xE3o." };
1984
+ const envelope = asRecord(record.error) ?? record;
1985
+ const message = firstText(envelope.message, record.message) ?? "N\xE3o foi poss\xEDvel executar a a\xE7\xE3o.";
1986
+ const details = unique(collectDetailMessages(envelope.details ?? record.details)).filter((detail) => detail !== message).slice(0, 3);
1987
+ const code = firstText(envelope.code, record.code);
1988
+ const status = firstNumber(envelope.status, envelope.statusCode, record.status, record.statusCode);
1989
+ const requestId = firstText(envelope.requestId, record.requestId);
1990
+ const technical = [
1991
+ code ? `C\xF3digo: ${code}` : void 0,
1992
+ status ? `HTTP: ${status}` : void 0,
1993
+ requestId ? `ID da requisi\xE7\xE3o: ${requestId}` : void 0
1994
+ ].filter((value) => Boolean(value));
1995
+ const contextParts = [...details, ...technical];
1996
+ return {
1997
+ message,
1998
+ ...contextParts.length ? { context: contextParts.join(" \u2022 ") } : {}
1999
+ };
2000
+ }
1948
2001
 
1949
2002
  // src/components/internal/conditions.ts
1950
2003
  function valueAt(source, path) {
@@ -1987,8 +2040,25 @@ var ACTION_TONES = {
1987
2040
  neutral: { bg: "#F1F5F9", color: "#334155", border: "#E2E8F0", hover: "#E8EEF5" },
1988
2041
  brand: { bg: "#E0F2FE", color: "#075985", border: "#BAE6FD", hover: "#D5EEFC" }
1989
2042
  };
1990
- function messageOf2(error) {
1991
- return error instanceof Error ? error.message : typeof error === "string" ? error : "N\xE3o foi poss\xEDvel executar a a\xE7\xE3o.";
2043
+ function ActionErrorMessage({ error }) {
2044
+ const description = describeActionError(error);
2045
+ return /* @__PURE__ */ jsxs8(
2046
+ Box6,
2047
+ {
2048
+ role: "alert",
2049
+ mt: "5px",
2050
+ maxW: "420px",
2051
+ p: "7px 9px",
2052
+ bg: "#FEF3F2",
2053
+ borderWidth: "1px",
2054
+ borderColor: "#FECDCA",
2055
+ borderRadius: "6px",
2056
+ children: [
2057
+ /* @__PURE__ */ jsx12(Text7, { color: "#B42318", fontSize: "10px", fontWeight: "600", lineHeight: "1.35", children: description.message }),
2058
+ description.context ? /* @__PURE__ */ jsx12(Text7, { mt: "2px", color: "#7A271A", fontSize: "9px", lineHeight: "1.35", children: description.context }) : null
2059
+ ]
2060
+ }
2061
+ );
1992
2062
  }
1993
2063
  function unwrap2(value) {
1994
2064
  if (!value || typeof value !== "object") return {};
@@ -2112,7 +2182,7 @@ function CoreRowAction({ action, row, parent, onOpenDetail, onRefresh, onUpdate
2112
2182
  ]
2113
2183
  }
2114
2184
  ),
2115
- error ? /* @__PURE__ */ jsx12(Text7, { mt: "3px", color: "#B42318", fontSize: "9px", children: messageOf2(error) }) : null,
2185
+ error ? /* @__PURE__ */ jsx12(ActionErrorMessage, { error }) : null,
2116
2186
  formOpen && pipelineAction.type === "formAction" ? /* @__PURE__ */ jsx12(
2117
2187
  DynamicForm,
2118
2188
  {
@@ -2214,12 +2284,12 @@ function CoreRelatedGrid({
2214
2284
  [id]: { ...current[id] ?? {}, [field]: value }
2215
2285
  }));
2216
2286
  const createFields = tab.create?.fields?.length ? tab.create.fields : formFieldsFromMeta(schema?.fields ?? []).filter((field) => ![relation.foreignKey, "_id", "createdAt", "updatedAt"].includes(field.field));
2217
- return /* @__PURE__ */ jsxs9(Box6, { children: [
2287
+ return /* @__PURE__ */ jsxs9(Box7, { children: [
2218
2288
  canCreate ? /* @__PURE__ */ jsx13(Flex5, { justify: "flex-end", mb: "10px", children: /* @__PURE__ */ jsx13(Button6, { size: "sm", colorPalette: "brand", onClick: () => {
2219
2289
  setCreateError(null);
2220
2290
  setCreating(true);
2221
2291
  }, children: tab.create?.label ?? "Novo registro" }) }) : null,
2222
- /* @__PURE__ */ jsx13(Box6, { overflowX: "auto", borderWidth: "1px", borderColor: "#E5E9ED", borderRadius: "10px", children: /* @__PURE__ */ jsxs9(Table2.Root, { size: "sm", minW: "760px", children: [
2292
+ /* @__PURE__ */ jsx13(Box7, { overflowX: "auto", borderWidth: "1px", borderColor: "#E5E9ED", borderRadius: "10px", children: /* @__PURE__ */ jsxs9(Table2.Root, { size: "sm", minW: "760px", children: [
2223
2293
  /* @__PURE__ */ jsx13(Table2.Header, { children: /* @__PURE__ */ jsxs9(Table2.Row, { bg: "#F4F7F9", children: [
2224
2294
  columns.map((column) => /* @__PURE__ */ jsx13(Table2.ColumnHeader, { fontSize: "10px", children: column.label ?? column.field }, column.field)),
2225
2295
  hasActions ? /* @__PURE__ */ jsx13(Table2.ColumnHeader, { children: "A\xE7\xF5es" }) : null
@@ -2332,7 +2402,7 @@ function initialFieldValue2(field, value) {
2332
2402
  function isMultiline2(field) {
2333
2403
  return /observa|descricao|mensagem|detalhe|necessidade/i.test(field.field);
2334
2404
  }
2335
- function messageOf3(error) {
2405
+ function messageOf2(error) {
2336
2406
  if (!error) return null;
2337
2407
  if (typeof error === "string") return error;
2338
2408
  if (error instanceof Error) return error.message;
@@ -2420,9 +2490,9 @@ function FieldControl({
2420
2490
  const checkedValue = String(field.checkedValue ?? true);
2421
2491
  const uncheckedValue = String(field.uncheckedValue ?? false);
2422
2492
  const checked = (value || uncheckedValue) === checkedValue;
2423
- return /* @__PURE__ */ jsxs10(Box7, { children: [
2493
+ return /* @__PURE__ */ jsxs10(Box8, { children: [
2424
2494
  /* @__PURE__ */ jsxs10(
2425
- Box7,
2495
+ Box8,
2426
2496
  {
2427
2497
  as: "label",
2428
2498
  display: "flex",
@@ -2458,7 +2528,7 @@ function FieldControl({
2458
2528
  }
2459
2529
  if (field.kind === "ref" && field.ref) {
2460
2530
  const reference = resolveReference2(field, values);
2461
- return /* @__PURE__ */ jsxs10(Box7, { children: [
2531
+ return /* @__PURE__ */ jsxs10(Box8, { children: [
2462
2532
  /* @__PURE__ */ jsx14(FieldLabel, { field, htmlFor: inputId }),
2463
2533
  /* @__PURE__ */ jsx14(
2464
2534
  ReferenceSelect,
@@ -2510,7 +2580,7 @@ function FieldControl({
2510
2580
  onChange: (event) => onChange(parseMaskedInput(event.currentTarget.value, mask))
2511
2581
  }
2512
2582
  );
2513
- return /* @__PURE__ */ jsxs10(Box7, { children: [
2583
+ return /* @__PURE__ */ jsxs10(Box8, { children: [
2514
2584
  /* @__PURE__ */ jsx14(FieldLabel, { field, htmlFor: inputId }),
2515
2585
  control,
2516
2586
  /* @__PURE__ */ jsx14(ErrorText2, { id: errorId, message: error })
@@ -2526,9 +2596,9 @@ function GroupSection({
2526
2596
  }) {
2527
2597
  if (!fields.length) return null;
2528
2598
  const columns = group.columns ?? 2;
2529
- return /* @__PURE__ */ jsxs10(Box7, { p: { base: "12px", md: "14px" }, bg: "#FAFCFD", borderWidth: "1px", borderColor: "#E5E9ED", borderRadius: "9px", children: [
2599
+ return /* @__PURE__ */ jsxs10(Box8, { p: { base: "12px", md: "14px" }, bg: "#FAFCFD", borderWidth: "1px", borderColor: "#E5E9ED", borderRadius: "9px", children: [
2530
2600
  /* @__PURE__ */ jsx14(Text9, { color: "#344054", fontSize: "12px", fontWeight: "700", children: group.label }),
2531
- group.description ? /* @__PURE__ */ jsx14(Text9, { mt: "2px", mb: "12px", color: "#667085", fontSize: "10px", children: group.description }) : /* @__PURE__ */ jsx14(Box7, { h: "10px" }),
2601
+ group.description ? /* @__PURE__ */ jsx14(Text9, { mt: "2px", mb: "12px", color: "#667085", fontSize: "10px", children: group.description }) : /* @__PURE__ */ jsx14(Box8, { h: "10px" }),
2532
2602
  /* @__PURE__ */ jsx14(SimpleGrid3, { columns: { base: 1, md: Math.min(columns, 2), xl: columns }, gapX: "16px", gapY: "14px", children: fields.map((field) => /* @__PURE__ */ jsx14(
2533
2603
  FieldControl,
2534
2604
  {
@@ -2641,7 +2711,7 @@ function InlineParentForm({
2641
2711
  }
2642
2712
  },
2643
2713
  children: /* @__PURE__ */ jsxs10(Stack3, { gap: "16px", children: [
2644
- error ? /* @__PURE__ */ jsx14(Box7, { role: "alert", p: "10px 12px", color: "#B42318", bg: "#FEF3F2", borderWidth: "1px", borderColor: "#FECDCA", borderRadius: "7px", fontSize: "11px", children: messageOf3(error) }) : null,
2714
+ error ? /* @__PURE__ */ jsx14(Box8, { role: "alert", p: "10px 12px", color: "#B42318", bg: "#FEF3F2", borderWidth: "1px", borderColor: "#FECDCA", borderRadius: "7px", fontSize: "11px", children: messageOf2(error) }) : null,
2645
2715
  renderFields(),
2646
2716
  !externalSubmit ? /* @__PURE__ */ jsx14(Flex6, { justify: "flex-end", children: /* @__PURE__ */ jsx14(Button7, { type: "submit", colorPalette: "brand", loading: saving, children: "Salvar dados principais" }) }) : null
2647
2717
  ] })
@@ -2679,7 +2749,7 @@ function CoreTabbedDetail({
2679
2749
  tab.id
2680
2750
  );
2681
2751
  }) }),
2682
- /* @__PURE__ */ jsx14(Box7, { children: !active ? null : active.type === "summary" && parent ? /* @__PURE__ */ jsx14(CoreSummaryCards, { cards: active.cards, parent, relations }) : active.type === "form" ? /* @__PURE__ */ jsx14(
2752
+ /* @__PURE__ */ jsx14(Box8, { children: !active ? null : active.type === "summary" && parent ? /* @__PURE__ */ jsx14(CoreSummaryCards, { cards: active.cards, parent, relations }) : active.type === "form" ? /* @__PURE__ */ jsx14(
2683
2753
  InlineParentForm,
2684
2754
  {
2685
2755
  fields: fieldsForTab(formFields, active.fields ?? active.groups?.flatMap((group) => group.fields)),
@@ -2765,9 +2835,9 @@ function CoreDetailModal({
2765
2835
  const displayTitle = parent?.[config.titleField ?? ""] ? String(parent[config.titleField ?? ""]) : title;
2766
2836
  const activeIsForm = (config.tabs.find((tab) => tab.id === activeTab) ?? config.tabs[0])?.type === "form";
2767
2837
  const formId = `oon-detail-form-${model.replace(/[^a-zA-Z0-9_-]/g, "-")}`;
2768
- return /* @__PURE__ */ jsx15(Flex7, { position: "fixed", inset: 0, zIndex: 1e3, align: "center", justify: "center", p: 4, bg: "rgba(15,23,42,.48)", children: /* @__PURE__ */ jsxs11(Box8, { role: "dialog", "aria-modal": "true", display: "flex", flexDirection: "column", w: `min(${width}, 98vw)`, h: "94vh", maxH: "94vh", overflow: "hidden", bg: "white", borderRadius: "14px", boxShadow: "0 24px 70px rgba(15,23,42,.24)", children: [
2838
+ return /* @__PURE__ */ jsx15(Flex7, { position: "fixed", inset: 0, zIndex: 1e3, align: "center", justify: "center", p: 4, bg: "rgba(15,23,42,.48)", children: /* @__PURE__ */ jsxs11(Box9, { role: "dialog", "aria-modal": "true", display: "flex", flexDirection: "column", w: `min(${width}, 98vw)`, h: "94vh", maxH: "94vh", overflow: "hidden", bg: "white", borderRadius: "14px", boxShadow: "0 24px 70px rgba(15,23,42,.24)", children: [
2769
2839
  /* @__PURE__ */ jsxs11(Flex7, { minH: "72px", px: "20px", py: "10px", align: "center", justify: "space-between", gap: 4, borderBottomWidth: "1px", borderColor: "#E5E9ED", children: [
2770
- /* @__PURE__ */ jsxs11(Box8, { minW: "160px", children: [
2840
+ /* @__PURE__ */ jsxs11(Box9, { minW: "160px", children: [
2771
2841
  /* @__PURE__ */ jsx15(Text10, { color: "#0474AF", fontSize: "10px", fontWeight: "700", textTransform: "uppercase", children: "Detalhe" }),
2772
2842
  /* @__PURE__ */ jsx15(Heading3, { size: "md", children: recordId ? displayTitle : `Novo ${title}` })
2773
2843
  ] }),
@@ -2794,7 +2864,7 @@ function CoreDetailModal({
2794
2864
  )
2795
2865
  ] })
2796
2866
  ] }),
2797
- /* @__PURE__ */ jsx15(Box8, { flex: "1", minH: 0, p: "20px", overflowY: "auto", children: schemaQuery.isLoading || parentQuery.isLoading ? /* @__PURE__ */ jsx15(Text10, { children: "Carregando..." }) : /* @__PURE__ */ jsx15(
2867
+ /* @__PURE__ */ jsx15(Box9, { flex: "1", minH: 0, p: "20px", overflowY: "auto", children: schemaQuery.isLoading || parentQuery.isLoading ? /* @__PURE__ */ jsx15(Text10, { children: "Carregando..." }) : /* @__PURE__ */ jsx15(
2798
2868
  CoreTabbedDetail,
2799
2869
  {
2800
2870
  tabs: config.tabs,
@@ -2830,7 +2900,7 @@ function CoreDetailModal({
2830
2900
  borderColor: "#E5E9ED",
2831
2901
  boxShadow: "0 -8px 24px rgba(15,23,42,.06)",
2832
2902
  children: [
2833
- /* @__PURE__ */ jsx15(Box8, { children: recordId ? bottomActions : null }),
2903
+ /* @__PURE__ */ jsx15(Box9, { children: recordId ? bottomActions : null }),
2834
2904
  /* @__PURE__ */ jsx15(Button8, { type: "submit", form: formId, colorPalette: "brand", disabled: !activeIsForm || schemaQuery.isLoading || parentQuery.isLoading, children: "Salvar" })
2835
2905
  ]
2836
2906
  }
@@ -2885,7 +2955,7 @@ function CoreCollection({ model, label, section = "Cole\xE7\xE3o", mode = "dynam
2885
2955
  if (needsSchema && schemaQuery.isError) return /* @__PURE__ */ jsx16(ErrorState, { error: schemaQuery.error });
2886
2956
  const title = label ?? schema?.name ?? model;
2887
2957
  return /* @__PURE__ */ jsxs12(Stack4, { gap: 5, children: [
2888
- /* @__PURE__ */ jsxs12(Box9, { children: [
2958
+ /* @__PURE__ */ jsxs12(Box10, { children: [
2889
2959
  /* @__PURE__ */ jsx16(Text11, { fontSize: "11px", fontWeight: "700", color: "brand.500", textTransform: "uppercase", letterSpacing: "0.08em", mb: 1, children: section }),
2890
2960
  /* @__PURE__ */ jsx16(Heading4, { size: "lg", color: "#24323A", letterSpacing: "-0.02em", children: title }),
2891
2961
  /* @__PURE__ */ jsx16(Text11, { mt: 1, fontSize: "13px", color: "gray.500", children: "Consulte, filtre e mantenha os registros desta opera\xE7\xE3o." })
@@ -2980,7 +3050,7 @@ function CoreDocument({ model, label, endpoint, columns, form }) {
2980
3050
 
2981
3051
  // src/components/CorePipeline.tsx
2982
3052
  import { useEffect as useEffect7, useRef as useRef2, useState as useState11 } from "react";
2983
- import { Badge as Badge4, Box as Box10, Button as Button9, Flex as Flex8, Heading as Heading5, Input as Input6, NativeSelect as NativeSelect5, Stack as Stack5, Text as Text12 } from "@chakra-ui/react";
3053
+ import { Badge as Badge4, Box as Box11, Button as Button9, Flex as Flex8, Heading as Heading5, Input as Input6, NativeSelect as NativeSelect5, Stack as Stack5, Text as Text12 } from "@chakra-ui/react";
2984
3054
  import { useMutation as useMutation3, useQuery as useQuery7, useQueryClient as useQueryClient4 } from "@tanstack/react-query";
2985
3055
 
2986
3056
  // src/pipelineTicket.ts
@@ -3155,7 +3225,7 @@ function PipelineFilterControl({
3155
3225
  onChange
3156
3226
  }) {
3157
3227
  if (filter.type === "ref" && meta?.ref) {
3158
- return /* @__PURE__ */ jsx18(Box10, { w: "220px", children: /* @__PURE__ */ jsx18(
3228
+ return /* @__PURE__ */ jsx18(Box11, { w: "220px", children: /* @__PURE__ */ jsx18(
3159
3229
  ReferenceSelect,
3160
3230
  {
3161
3231
  field: filter.field,
@@ -3338,7 +3408,7 @@ function CorePipeline({
3338
3408
  ] }) : null;
3339
3409
  return /* @__PURE__ */ jsxs13(Stack5, { gap: 5, children: [
3340
3410
  /* @__PURE__ */ jsxs13(Flex8, { align: { base: "stretch", md: "flex-end" }, justify: "space-between", gap: 4, direction: { base: "column", md: "row" }, children: [
3341
- /* @__PURE__ */ jsxs13(Box10, { children: [
3411
+ /* @__PURE__ */ jsxs13(Box11, { children: [
3342
3412
  /* @__PURE__ */ jsx18(Text12, { fontSize: "11px", fontWeight: "700", color: "brand.500", textTransform: "uppercase", letterSpacing: "0.08em", mb: 1, children: "Esteira de processo" }),
3343
3413
  /* @__PURE__ */ jsx18(Heading5, { size: "lg", color: "#24323A", letterSpacing: "-0.02em", children: label ?? schema?.name ?? model }),
3344
3414
  /* @__PURE__ */ jsx18(Text12, { mt: 1, fontSize: "13px", color: "gray.500", children: "Acompanhe os tickets por etapa e visualize os principais dados de cada item." })
@@ -3351,7 +3421,7 @@ function CorePipeline({
3351
3421
  filters.length ? /* @__PURE__ */ jsxs13(Flex8, { p: "12px", gap: "10px", align: "flex-end", wrap: "wrap", bg: "white", borderWidth: "1px", borderColor: "#E5E9ED", borderRadius: "10px", children: [
3352
3422
  filters.map((filter) => {
3353
3423
  const meta = schema?.fields.find((field) => field.name === filter.field);
3354
- return /* @__PURE__ */ jsxs13(Box10, { children: [
3424
+ return /* @__PURE__ */ jsxs13(Box11, { children: [
3355
3425
  /* @__PURE__ */ jsx18(Text12, { mb: "4px", fontSize: "10px", color: "#667085", fontWeight: "600", children: filter.label ?? fieldLabel({ name: filter.field }) }),
3356
3426
  /* @__PURE__ */ jsx18(
3357
3427
  PipelineFilterControl,
@@ -3387,7 +3457,7 @@ function CorePipeline({
3387
3457
  setSelectedTicket(row);
3388
3458
  }
3389
3459
  }
3390
- ) : /* @__PURE__ */ jsxs13(Box10, { position: "relative", children: [
3460
+ ) : /* @__PURE__ */ jsxs13(Box11, { position: "relative", children: [
3391
3461
  /* @__PURE__ */ jsx18(
3392
3462
  Flex8,
3393
3463
  {
@@ -3406,12 +3476,12 @@ function CorePipeline({
3406
3476
  overscrollBehaviorX: "contain",
3407
3477
  children: Array.from(byStage.entries()).map(([stageId, items]) => {
3408
3478
  const stageLabel = resolvedStages.find((stage) => stage.id === stageId)?.label ?? (stageId || "Sem etapa");
3409
- return /* @__PURE__ */ jsxs13(Box10, { minW: "300px", maxW: "340px", flex: "1 0 300px", bg: "#E8ECEF", borderRadius: "12px", p: 3, borderWidth: "1px", borderColor: "#DDE3E7", children: [
3479
+ return /* @__PURE__ */ jsxs13(Box11, { minW: "300px", maxW: "340px", flex: "1 0 300px", bg: "#E8ECEF", borderRadius: "12px", p: 3, borderWidth: "1px", borderColor: "#DDE3E7", children: [
3410
3480
  /* @__PURE__ */ jsxs13(Flex8, { align: "center", justify: "space-between", mb: 3, px: 1, children: [
3411
3481
  /* @__PURE__ */ jsx18(Text12, { fontWeight: "700", fontSize: "12px", color: "#33434C", textTransform: "uppercase", letterSpacing: "0.03em", children: stageLabel }),
3412
3482
  /* @__PURE__ */ jsx18(Badge4, { colorPalette: "brand", variant: "solid", borderRadius: "full", minW: "24px", justifyContent: "center", children: items.length })
3413
3483
  ] }),
3414
- /* @__PURE__ */ jsx18(Stack5, { gap: 2, children: items.length === 0 ? /* @__PURE__ */ jsx18(Box10, { borderWidth: "1px", borderStyle: "dashed", borderColor: "#C8D0D5", borderRadius: "10px", p: 5, textAlign: "center", children: /* @__PURE__ */ jsx18(Text12, { fontSize: "12px", color: "gray.500", children: "Nenhum ticket nesta etapa." }) }) : items.map((row, index) => {
3484
+ /* @__PURE__ */ jsx18(Stack5, { gap: 2, children: items.length === 0 ? /* @__PURE__ */ jsx18(Box11, { borderWidth: "1px", borderStyle: "dashed", borderColor: "#C8D0D5", borderRadius: "10px", p: 5, textAlign: "center", children: /* @__PURE__ */ jsx18(Text12, { fontSize: "12px", color: "gray.500", children: "Nenhum ticket nesta etapa." }) }) : items.map((row, index) => {
3415
3485
  const ticketTitle = formatCell(row[resolvedTitleField], "string");
3416
3486
  return /* @__PURE__ */ jsxs13(
3417
3487
  Button9,
@@ -3441,7 +3511,7 @@ function CorePipeline({
3441
3511
  /* @__PURE__ */ jsxs13(Flex8, { align: "flex-start", justify: "space-between", gap: "8px", mb: 2, children: [
3442
3512
  /* @__PURE__ */ jsx18(Text12, { fontSize: "13px", fontWeight: "700", color: "#24323A", lineClamp: 2, children: ticketTitle }),
3443
3513
  /* @__PURE__ */ jsx18(
3444
- Box10,
3514
+ Box11,
3445
3515
  {
3446
3516
  as: "span",
3447
3517
  title: `Status da atividade: ${String(row[workStatusField] ?? "N\xE3o informado")}`,
@@ -3577,7 +3647,7 @@ function CorePipeline({
3577
3647
  }
3578
3648
 
3579
3649
  // src/components/CoreDashboard.tsx
3580
- import { Box as Box11, Heading as Heading6, SimpleGrid as SimpleGrid4, Stack as Stack6, Text as Text13 } from "@chakra-ui/react";
3650
+ import { Box as Box12, Heading as Heading6, SimpleGrid as SimpleGrid4, Stack as Stack6, Text as Text13 } from "@chakra-ui/react";
3581
3651
  import { useQueries } from "@tanstack/react-query";
3582
3652
  import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
3583
3653
  function CoreDashboard({ label = "Dashboard", widgets = [] }) {
@@ -3600,11 +3670,11 @@ function CoreDashboard({ label = "Dashboard", widgets = [] }) {
3600
3670
  /* @__PURE__ */ jsx19(Heading6, { size: "lg", children: label }),
3601
3671
  /* @__PURE__ */ jsx19(SimpleGrid4, { columns: { base: 1, md: 2, lg: 3 }, gap: 4, children: widgets.map((w) => {
3602
3672
  if (w.kind === "custom" && w.render) {
3603
- return /* @__PURE__ */ jsx19(Box11, { borderWidth: "1px", borderColor: "gray.200", borderRadius: "md", bg: "white", p: 5, children: w.render() }, w.id);
3673
+ return /* @__PURE__ */ jsx19(Box12, { borderWidth: "1px", borderColor: "gray.200", borderRadius: "md", bg: "white", p: 5, children: w.render() }, w.id);
3604
3674
  }
3605
3675
  const q = queries[queryIdx++];
3606
3676
  const value = q?.isLoading ? "\u2026" : q?.isError ? "\u2014" : formatWidget(q?.data, w.kind, w.field);
3607
- return /* @__PURE__ */ jsxs14(Box11, { borderWidth: "1px", borderColor: "gray.200", borderRadius: "md", bg: "white", p: 5, children: [
3677
+ return /* @__PURE__ */ jsxs14(Box12, { borderWidth: "1px", borderColor: "gray.200", borderRadius: "md", bg: "white", p: 5, children: [
3608
3678
  /* @__PURE__ */ jsx19(Text13, { fontSize: "sm", color: "gray.500", children: w.label }),
3609
3679
  /* @__PURE__ */ jsx19(Heading6, { size: "xl", mt: 1, children: value })
3610
3680
  ] }, w.id);
@@ -3620,7 +3690,7 @@ function formatWidget(value, kind, field) {
3620
3690
  }
3621
3691
 
3622
3692
  // src/components/ui-v2/CorePage.tsx
3623
- import { Box as Box14, Heading as Heading8, Stack as Stack7, Text as Text16 } from "@chakra-ui/react";
3693
+ import { Box as Box15, Heading as Heading8, Stack as Stack7, Text as Text16 } from "@chakra-ui/react";
3624
3694
 
3625
3695
  // src/security/PermissionGate.tsx
3626
3696
  import { Fragment as Fragment3, jsx as jsx20 } from "react/jsx-runtime";
@@ -3634,7 +3704,7 @@ function PermissionGate({
3634
3704
  }
3635
3705
 
3636
3706
  // src/app/componentRegistry.tsx
3637
- import { Box as Box12, Text as Text14 } from "@chakra-ui/react";
3707
+ import { Box as Box13, Text as Text14 } from "@chakra-ui/react";
3638
3708
  import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
3639
3709
  var PREFIX_BUCKETS = {
3640
3710
  "custom": "pageComponents",
@@ -3656,7 +3726,7 @@ function resolveComponent(registry, key, bucket) {
3656
3726
  }
3657
3727
  function MissingRenderer({ renderer, children }) {
3658
3728
  if (import.meta.env?.MODE === "production") return /* @__PURE__ */ jsx21(Fragment4, { children: children ?? null });
3659
- return /* @__PURE__ */ jsxs15(Box12, { borderWidth: "1px", borderStyle: "dashed", borderColor: "orange.300", bg: "orange.50", color: "orange.900", borderRadius: "md", p: 3, children: [
3729
+ return /* @__PURE__ */ jsxs15(Box13, { borderWidth: "1px", borderStyle: "dashed", borderColor: "orange.300", bg: "orange.50", color: "orange.900", borderRadius: "md", p: 3, children: [
3660
3730
  /* @__PURE__ */ jsx21(Text14, { fontSize: "sm", fontWeight: "600", children: "Renderer n\xE3o encontrado" }),
3661
3731
  /* @__PURE__ */ jsxs15(Text14, { fontSize: "xs", children: [
3662
3732
  "Registre a chave ",
@@ -3668,14 +3738,14 @@ function MissingRenderer({ renderer, children }) {
3668
3738
  }
3669
3739
 
3670
3740
  // src/components/ui-v2/CorePrimitives.tsx
3671
- import { Box as Box13, Button as Button10, Flex as Flex9, Heading as Heading7, Spinner as Spinner3, Text as Text15 } from "@chakra-ui/react";
3741
+ import { Box as Box14, Button as Button10, Flex as Flex9, Heading as Heading7, Spinner as Spinner3, Text as Text15 } from "@chakra-ui/react";
3672
3742
  import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
3673
3743
  function CorePage({ children }) {
3674
- return /* @__PURE__ */ jsx22(Box13, { children });
3744
+ return /* @__PURE__ */ jsx22(Box14, { children });
3675
3745
  }
3676
3746
  function CorePageHeader({ title, description, actions }) {
3677
3747
  return /* @__PURE__ */ jsxs16(Flex9, { align: "start", justify: "space-between", gap: 4, mb: 6, children: [
3678
- /* @__PURE__ */ jsxs16(Box13, { children: [
3748
+ /* @__PURE__ */ jsxs16(Box14, { children: [
3679
3749
  title ? /* @__PURE__ */ jsx22(Heading7, { size: "lg", children: title }) : null,
3680
3750
  description ? /* @__PURE__ */ jsx22(Text15, { color: "gray.600", mt: 1, children: description }) : null
3681
3751
  ] }),
@@ -3692,10 +3762,10 @@ function CoreCards(props) {
3692
3762
  return /* @__PURE__ */ jsx22(CoreCollection, { model: props.model, mode: "minimal", label: props.model });
3693
3763
  }
3694
3764
  function CoreForm(props) {
3695
- return /* @__PURE__ */ jsx22(Box13, { children: props.children });
3765
+ return /* @__PURE__ */ jsx22(Box14, { children: props.children });
3696
3766
  }
3697
3767
  function CoreField({ label, children }) {
3698
- return /* @__PURE__ */ jsxs16(Box13, { children: [
3768
+ return /* @__PURE__ */ jsxs16(Box14, { children: [
3699
3769
  /* @__PURE__ */ jsx22(Text15, { fontSize: "sm", fontWeight: "600", children: label }),
3700
3770
  children
3701
3771
  ] });
@@ -3707,7 +3777,7 @@ function CoreActions({ children }) {
3707
3777
  return /* @__PURE__ */ jsx22(Flex9, { gap: 2, children });
3708
3778
  }
3709
3779
  function CoreEmptyState({ title = "Nenhum dado encontrado", actionLabel, onAction }) {
3710
- return /* @__PURE__ */ jsxs16(Box13, { textAlign: "center", py: 10, children: [
3780
+ return /* @__PURE__ */ jsxs16(Box14, { textAlign: "center", py: 10, children: [
3711
3781
  /* @__PURE__ */ jsx22(Text15, { children: title }),
3712
3782
  actionLabel ? /* @__PURE__ */ jsx22(Button10, { mt: 3, onClick: onAction, children: actionLabel }) : null
3713
3783
  ] });
@@ -3743,7 +3813,7 @@ function CoreBlock({ block, registry }) {
3743
3813
  return Component ? /* @__PURE__ */ jsx23(Component, { block, model: block.model }) : /* @__PURE__ */ jsx23(CoreCards, { model: block.model, renderer: block.renderer });
3744
3814
  }
3745
3815
  case "section":
3746
- return /* @__PURE__ */ jsxs17(Box14, { children: [
3816
+ return /* @__PURE__ */ jsxs17(Box15, { children: [
3747
3817
  /* @__PURE__ */ jsx23(Heading8, { size: "md", mb: block.description ? 1 : 4, children: block.title }),
3748
3818
  block.description ? /* @__PURE__ */ jsx23(Text16, { color: "gray.600", mb: 4, children: block.description }) : null,
3749
3819
  /* @__PURE__ */ jsx23(Stack7, { gap: 4, children: block.blocks?.map((child, index) => /* @__PURE__ */ jsx23(CoreBlock, { block: child, registry }, child.id ?? index)) })
@@ -3914,11 +3984,11 @@ import {
3914
3984
  } from "react-router-dom";
3915
3985
 
3916
3986
  // src/shell/DefaultShell.tsx
3917
- import { Box as Box16, Button as Button11, Flex as Flex11, Spacer as Spacer2, Text as Text18 } from "@chakra-ui/react";
3987
+ import { Box as Box17, Button as Button11, Flex as Flex11, Spacer as Spacer2, Text as Text18 } from "@chakra-ui/react";
3918
3988
  import { Outlet } from "react-router-dom";
3919
3989
 
3920
3990
  // src/shell/Sidebar.tsx
3921
- import { Box as Box15, Flex as Flex10, Image, Stack as Stack8, Text as Text17 } from "@chakra-ui/react";
3991
+ import { Box as Box16, Flex as Flex10, Image, Stack as Stack8, Text as Text17 } from "@chakra-ui/react";
3922
3992
  import { NavLink } from "react-router-dom";
3923
3993
  import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
3924
3994
  function groupBySection(items) {
@@ -3934,7 +4004,7 @@ function Sidebar({ app, menu, registry }) {
3934
4004
  const { hasPermission } = useOonAuth();
3935
4005
  const visible = menu.filter((item) => !item.hidden && hasPermission(item.permissions));
3936
4006
  return /* @__PURE__ */ jsxs18(
3937
- Box15,
4007
+ Box16,
3938
4008
  {
3939
4009
  as: "nav",
3940
4010
  w: { base: "76px", lg: "248px" },
@@ -3966,7 +4036,7 @@ function Sidebar({ app, menu, registry }) {
3966
4036
  children: "O"
3967
4037
  }
3968
4038
  ),
3969
- /* @__PURE__ */ jsxs18(Box15, { display: { base: "none", lg: "block" }, minW: 0, children: [
4039
+ /* @__PURE__ */ jsxs18(Box16, { display: { base: "none", lg: "block" }, minW: 0, children: [
3970
4040
  /* @__PURE__ */ jsx25(Text17, { fontWeight: "700", fontSize: "sm", color: "#07262E", lineClamp: 1, children: app.name }),
3971
4041
  /* @__PURE__ */ jsx25(Text17, { fontSize: "10px", color: "gray.500", textTransform: "uppercase", letterSpacing: "0.08em", children: "Opera\xE7\xE3o digital" })
3972
4042
  ] })
@@ -4007,7 +4077,7 @@ function Sidebar({ app, menu, registry }) {
4007
4077
  transition: "all 0.15s ease",
4008
4078
  _hover: { bg: isActive ? "brand.50" : "#F8F9FA", color: "brand.700" },
4009
4079
  children: [
4010
- item.icon ? /* @__PURE__ */ jsx25(Box15, { flex: "0 0 auto", children: item.icon }) : /* @__PURE__ */ jsx25(Box15, { w: "7px", h: "7px", borderRadius: "full", bg: isActive ? "brand.500" : "gray.300" }),
4080
+ item.icon ? /* @__PURE__ */ jsx25(Box16, { flex: "0 0 auto", children: item.icon }) : /* @__PURE__ */ jsx25(Box16, { w: "7px", h: "7px", borderRadius: "full", bg: isActive ? "brand.500" : "gray.300" }),
4011
4081
  /* @__PURE__ */ jsx25(Text17, { display: { base: "none", lg: "block" }, lineClamp: 1, children: item.label })
4012
4082
  ]
4013
4083
  }
@@ -4024,13 +4094,13 @@ import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
4024
4094
  function CoreTopbar({ app }) {
4025
4095
  const { user, logout } = useOonAuth();
4026
4096
  return /* @__PURE__ */ jsxs19(Flex11, { as: "header", align: "center", minH: "64px", px: { base: 4, lg: 6 }, py: 3, borderBottomWidth: "1px", borderColor: "#E8ECEF", bg: "rgba(255, 255, 255, 0.96)", backdropFilter: "blur(10px)", position: "sticky", top: 0, zIndex: 10, children: [
4027
- /* @__PURE__ */ jsxs19(Box16, { children: [
4097
+ /* @__PURE__ */ jsxs19(Box17, { children: [
4028
4098
  /* @__PURE__ */ jsx26(Text18, { fontSize: "xs", fontWeight: "600", color: "brand.500", textTransform: "uppercase", letterSpacing: "0.08em", children: "Central Oon" }),
4029
4099
  /* @__PURE__ */ jsx26(Text18, { fontSize: "sm", fontWeight: "600", color: "#24323A", children: app.title ?? app.name })
4030
4100
  ] }),
4031
4101
  /* @__PURE__ */ jsx26(Spacer2, {}),
4032
4102
  user ? /* @__PURE__ */ jsxs19(Flex11, { align: "center", gap: 3, children: [
4033
- /* @__PURE__ */ jsxs19(Box16, { textAlign: "right", display: { base: "none", md: "block" }, children: [
4103
+ /* @__PURE__ */ jsxs19(Box17, { textAlign: "right", display: { base: "none", md: "block" }, children: [
4034
4104
  /* @__PURE__ */ jsx26(Text18, { fontSize: "sm", fontWeight: "600", color: "#24323A", children: user.nome }),
4035
4105
  user.email ? /* @__PURE__ */ jsx26(Text18, { fontSize: "xs", color: "gray.500", children: user.email }) : null
4036
4106
  ] }),
@@ -4046,7 +4116,7 @@ function Slot({ name, slot, registry, app, menu }) {
4046
4116
  }
4047
4117
  if (name === "sidebar") return /* @__PURE__ */ jsx26(Sidebar, { app, menu, registry });
4048
4118
  if (name === "topbar") return /* @__PURE__ */ jsx26(CoreTopbar, { app });
4049
- if (name === "footer" && slot === "core") return /* @__PURE__ */ jsx26(Box16, { as: "footer", px: 6, py: 4, color: "gray.500", fontSize: "xs", borderTopWidth: "1px", children: "OonCore" });
4119
+ if (name === "footer" && slot === "core") return /* @__PURE__ */ jsx26(Box17, { as: "footer", px: 6, py: 4, color: "gray.500", fontSize: "xs", borderTopWidth: "1px", children: "OonCore" });
4050
4120
  return null;
4051
4121
  }
4052
4122
  function DefaultShell({ app, menu, layout, registry }) {
@@ -4057,7 +4127,7 @@ function DefaultShell({ app, menu, layout, registry }) {
4057
4127
  /* @__PURE__ */ jsxs19(Flex11, { direction: "column", flex: "1", minW: 0, children: [
4058
4128
  /* @__PURE__ */ jsx26(Slot, { name: "topbar", slot: layout?.topbar ?? "core", registry, app, menu }),
4059
4129
  /* @__PURE__ */ jsx26(Slot, { name: "header", slot: layout?.header, registry, app, menu }),
4060
- /* @__PURE__ */ jsx26(Box16, { as: "main", flex: "1", p: mainPadding, minW: 0, children: /* @__PURE__ */ jsx26(Box16, { maxW: portal ? "1180px" : "1680px", mx: "auto", children: /* @__PURE__ */ jsx26(Outlet, {}) }) }),
4130
+ /* @__PURE__ */ jsx26(Box17, { as: "main", flex: "1", p: mainPadding, minW: 0, children: /* @__PURE__ */ jsx26(Box17, { maxW: portal ? "1180px" : "1680px", mx: "auto", children: /* @__PURE__ */ jsx26(Outlet, {}) }) }),
4061
4131
  /* @__PURE__ */ jsx26(Slot, { name: "footer", slot: layout?.footer ?? "none", registry, app, menu })
4062
4132
  ] })
4063
4133
  ] });
@@ -4078,7 +4148,7 @@ function AuthenticatedLayout({ app, menu, layout, registry }) {
4078
4148
  }
4079
4149
 
4080
4150
  // src/security/AccessDeniedPage.tsx
4081
- import { Box as Box17, Button as Button12, Flex as Flex12, Heading as Heading9, Text as Text19, VStack } from "@chakra-ui/react";
4151
+ import { Box as Box18, Button as Button12, Flex as Flex12, Heading as Heading9, Text as Text19, VStack } from "@chakra-ui/react";
4082
4152
  import { useNavigate } from "react-router-dom";
4083
4153
  import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
4084
4154
  function AccessDeniedPage({ app }) {
@@ -4089,7 +4159,7 @@ function AccessDeniedPage({ app }) {
4089
4159
  navigate("/login", { replace: true });
4090
4160
  }
4091
4161
  return /* @__PURE__ */ jsx28(Flex12, { minH: "100vh", align: "center", justify: "center", bg: "#F5F8FA", px: 4, children: /* @__PURE__ */ jsx28(
4092
- Box17,
4162
+ Box18,
4093
4163
  {
4094
4164
  width: "100%",
4095
4165
  maxW: "560px",
@@ -4101,7 +4171,7 @@ function AccessDeniedPage({ app }) {
4101
4171
  p: { base: 6, md: 10 },
4102
4172
  children: /* @__PURE__ */ jsxs20(VStack, { align: "stretch", gap: 6, children: [
4103
4173
  /* @__PURE__ */ jsx28(
4104
- Box17,
4174
+ Box18,
4105
4175
  {
4106
4176
  width: "56px",
4107
4177
  height: "56px",
@@ -4117,7 +4187,7 @@ function AccessDeniedPage({ app }) {
4117
4187
  children: "!"
4118
4188
  }
4119
4189
  ),
4120
- /* @__PURE__ */ jsxs20(Box17, { children: [
4190
+ /* @__PURE__ */ jsxs20(Box18, { children: [
4121
4191
  /* @__PURE__ */ jsx28(
4122
4192
  Text19,
4123
4193
  {
@@ -4193,7 +4263,7 @@ function AppAccessGuard({ children }) {
4193
4263
  // src/security/LoginPage.tsx
4194
4264
  import { useState as useState12 } from "react";
4195
4265
  import {
4196
- Box as Box18,
4266
+ Box as Box19,
4197
4267
  Button as Button13,
4198
4268
  Flex as Flex13,
4199
4269
  Heading as Heading10,
@@ -4242,7 +4312,7 @@ function LoginPage({ app }) {
4242
4312
  }
4243
4313
  }
4244
4314
  return /* @__PURE__ */ jsx30(Flex13, { minH: "100vh", align: "center", justify: "center", bg: "#F5F8FA", px: 4, children: /* @__PURE__ */ jsx30(
4245
- Box18,
4315
+ Box19,
4246
4316
  {
4247
4317
  width: "100%",
4248
4318
  maxW: "440px",
@@ -4253,7 +4323,7 @@ function LoginPage({ app }) {
4253
4323
  boxShadow: "0 24px 70px rgba(7, 38, 46, 0.10)",
4254
4324
  p: { base: 6, md: 9 },
4255
4325
  children: /* @__PURE__ */ jsx30("form", { onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs21(VStack2, { align: "stretch", gap: 6, children: [
4256
- /* @__PURE__ */ jsxs21(Box18, { children: [
4326
+ /* @__PURE__ */ jsxs21(Box19, { children: [
4257
4327
  /* @__PURE__ */ jsx30(
4258
4328
  Text20,
4259
4329
  {
@@ -4269,7 +4339,7 @@ function LoginPage({ app }) {
4269
4339
  /* @__PURE__ */ jsx30(Text20, { mt: 2, color: "gray.600", fontSize: "sm", children: "Entre com seu usu\xE1rio autorizado para acessar este aplicativo." })
4270
4340
  ] }),
4271
4341
  /* @__PURE__ */ jsxs21(VStack2, { align: "stretch", gap: 4, children: [
4272
- /* @__PURE__ */ jsxs21(Box18, { children: [
4342
+ /* @__PURE__ */ jsxs21(Box19, { children: [
4273
4343
  /* @__PURE__ */ jsx30(Text20, { mb: 2, fontSize: "sm", fontWeight: "600", color: "#24323A", children: "E-mail" }),
4274
4344
  /* @__PURE__ */ jsx30(
4275
4345
  Input7,
@@ -4283,7 +4353,7 @@ function LoginPage({ app }) {
4283
4353
  }
4284
4354
  )
4285
4355
  ] }),
4286
- /* @__PURE__ */ jsxs21(Box18, { children: [
4356
+ /* @__PURE__ */ jsxs21(Box19, { children: [
4287
4357
  /* @__PURE__ */ jsx30(Text20, { mb: 2, fontSize: "sm", fontWeight: "600", color: "#24323A", children: "Senha" }),
4288
4358
  /* @__PURE__ */ jsx30(
4289
4359
  Input7,
@@ -4299,7 +4369,7 @@ function LoginPage({ app }) {
4299
4369
  ] })
4300
4370
  ] }),
4301
4371
  message ? /* @__PURE__ */ jsx30(
4302
- Box18,
4372
+ Box19,
4303
4373
  {
4304
4374
  role: "alert",
4305
4375
  borderRadius: "10px",
@@ -4329,7 +4399,7 @@ function LoginPage({ app }) {
4329
4399
 
4330
4400
  // src/security/ActivationPage.tsx
4331
4401
  import { useEffect as useEffect8, useState as useState13 } from "react";
4332
- import { Box as Box19, Button as Button14, Heading as Heading11, Input as Input8, Text as Text21, VStack as VStack3 } from "@chakra-ui/react";
4402
+ import { Box as Box20, Button as Button14, Heading as Heading11, Input as Input8, Text as Text21, VStack as VStack3 } from "@chakra-ui/react";
4333
4403
  import { Fragment as Fragment6, jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
4334
4404
  function encodeBasicCredentials2(email, password) {
4335
4405
  const bytes = new TextEncoder().encode(`${email}:${password}`);
@@ -4464,7 +4534,7 @@ function ActivationPage() {
4464
4534
  }
4465
4535
  }
4466
4536
  function renderField(field, values, setValues) {
4467
- return /* @__PURE__ */ jsxs22(Box19, { w: "100%", children: [
4537
+ return /* @__PURE__ */ jsxs22(Box20, { w: "100%", children: [
4468
4538
  /* @__PURE__ */ jsxs22(Text21, { fontWeight: "medium", children: [
4469
4539
  field.label,
4470
4540
  field.required ? " *" : ""
@@ -4487,7 +4557,7 @@ function ActivationPage() {
4487
4557
  function renderDevLocalActivation() {
4488
4558
  return /* @__PURE__ */ jsxs22(Fragment6, { children: [
4489
4559
  /* @__PURE__ */ jsx31(Text21, { color: "gray.700", children: "Entre com seu e-mail e senha para ativar esta Central em ambiente de desenvolvimento. Se o e-mail ainda n\xE3o existir na Central de Ativa\xE7\xF5es, o usu\xE1rio ser\xE1 criado automaticamente com perfil de desenvolvedor." }),
4490
- /* @__PURE__ */ jsxs22(Box19, { w: "100%", children: [
4560
+ /* @__PURE__ */ jsxs22(Box20, { w: "100%", children: [
4491
4561
  /* @__PURE__ */ jsx31(Text21, { fontWeight: "medium", children: "Nome do usu\xE1rio" }),
4492
4562
  /* @__PURE__ */ jsx31(
4493
4563
  Input8,
@@ -4499,7 +4569,7 @@ function ActivationPage() {
4499
4569
  }
4500
4570
  )
4501
4571
  ] }),
4502
- /* @__PURE__ */ jsxs22(Box19, { w: "100%", children: [
4572
+ /* @__PURE__ */ jsxs22(Box20, { w: "100%", children: [
4503
4573
  /* @__PURE__ */ jsx31(Text21, { fontWeight: "medium", children: "E-mail *" }),
4504
4574
  /* @__PURE__ */ jsx31(
4505
4575
  Input8,
@@ -4512,7 +4582,7 @@ function ActivationPage() {
4512
4582
  }
4513
4583
  )
4514
4584
  ] }),
4515
- /* @__PURE__ */ jsxs22(Box19, { w: "100%", children: [
4585
+ /* @__PURE__ */ jsxs22(Box20, { w: "100%", children: [
4516
4586
  /* @__PURE__ */ jsx31(Text21, { fontWeight: "medium", children: "Senha *" }),
4517
4587
  /* @__PURE__ */ jsx31(
4518
4588
  Input8,
@@ -4550,7 +4620,7 @@ function ActivationPage() {
4550
4620
  const rootMode = config?.mode === "root-bootstrap" || activation.details?.role === "root";
4551
4621
  const isDevelopmentMember = !rootMode && config?.technical?.ambiente === "desenvolvimento";
4552
4622
  if (activation.status === "loading" || !config) {
4553
- return /* @__PURE__ */ jsx31(Box19, { minH: "100vh", bg: "gray.50", p: 8, children: /* @__PURE__ */ jsxs22(
4623
+ return /* @__PURE__ */ jsx31(Box20, { minH: "100vh", bg: "gray.50", p: 8, children: /* @__PURE__ */ jsxs22(
4554
4624
  VStack3,
4555
4625
  {
4556
4626
  maxW: "760px",
@@ -4568,7 +4638,7 @@ function ActivationPage() {
4568
4638
  ) });
4569
4639
  }
4570
4640
  if (rootMode) {
4571
- return /* @__PURE__ */ jsx31(Box19, { minH: "100vh", bg: "gray.50", p: 8, children: /* @__PURE__ */ jsxs22(
4641
+ return /* @__PURE__ */ jsx31(Box20, { minH: "100vh", bg: "gray.50", p: 8, children: /* @__PURE__ */ jsxs22(
4572
4642
  VStack3,
4573
4643
  {
4574
4644
  maxW: "560px",
@@ -4590,7 +4660,7 @@ function ActivationPage() {
4590
4660
  ] }),
4591
4661
  error ? /* @__PURE__ */ jsx31(Text21, { color: "red.600", children: error }) : null,
4592
4662
  step !== 6 ? /* @__PURE__ */ jsxs22(Fragment6, { children: [
4593
- /* @__PURE__ */ jsxs22(Box19, { w: "100%", children: [
4663
+ /* @__PURE__ */ jsxs22(Box20, { w: "100%", children: [
4594
4664
  /* @__PURE__ */ jsx31(Text21, { fontWeight: "medium", children: "E-mail do administrador *" }),
4595
4665
  /* @__PURE__ */ jsx31(
4596
4666
  Input8,
@@ -4603,7 +4673,7 @@ function ActivationPage() {
4603
4673
  }
4604
4674
  )
4605
4675
  ] }),
4606
- /* @__PURE__ */ jsxs22(Box19, { w: "100%", children: [
4676
+ /* @__PURE__ */ jsxs22(Box20, { w: "100%", children: [
4607
4677
  /* @__PURE__ */ jsx31(Text21, { fontWeight: "medium", children: "Senha *" }),
4608
4678
  /* @__PURE__ */ jsx31(
4609
4679
  Input8,
@@ -4635,7 +4705,7 @@ function ActivationPage() {
4635
4705
  }
4636
4706
  ) });
4637
4707
  }
4638
- return /* @__PURE__ */ jsx31(Box19, { minH: "100vh", bg: "gray.50", p: 8, children: /* @__PURE__ */ jsxs22(
4708
+ return /* @__PURE__ */ jsx31(Box20, { minH: "100vh", bg: "gray.50", p: 8, children: /* @__PURE__ */ jsxs22(
4639
4709
  VStack3,
4640
4710
  {
4641
4711
  maxW: "760px",
@@ -4734,7 +4804,7 @@ function InstanceBlockedPage({
4734
4804
  title,
4735
4805
  message
4736
4806
  }) {
4737
- return /* @__PURE__ */ jsxs22(Box19, { p: 8, children: [
4807
+ return /* @__PURE__ */ jsxs22(Box20, { p: 8, children: [
4738
4808
  /* @__PURE__ */ jsx31(Heading11, { children: title }),
4739
4809
  /* @__PURE__ */ jsx31(Text21, { children: message })
4740
4810
  ] });
@@ -5048,7 +5118,7 @@ function defineOonModule(mod) {
5048
5118
  }
5049
5119
 
5050
5120
  // src/components/CoreIntegration.tsx
5051
- import { Badge as Badge5, Box as Box20, Button as Button15, Flex as Flex14, Heading as Heading12, Stack as Stack9, Text as Text22 } from "@chakra-ui/react";
5121
+ import { Badge as Badge5, Box as Box21, Button as Button15, Flex as Flex14, Heading as Heading12, Stack as Stack9, Text as Text22 } from "@chakra-ui/react";
5052
5122
  import { useMutation as useMutation4 } from "@tanstack/react-query";
5053
5123
  import { jsx as jsx37, jsxs as jsxs23 } from "react/jsx-runtime";
5054
5124
  function CoreIntegration({ label = "Integra\xE7\xF5es" }) {
@@ -5066,7 +5136,7 @@ function CoreIntegration({ label = "Integra\xE7\xF5es" }) {
5066
5136
  /* @__PURE__ */ jsx37(Button15, { size: "sm", variant: "outline", loading: reprocess.isPending, onClick: () => reprocess.mutate(), children: "Reprocessar ativos" })
5067
5137
  ] }),
5068
5138
  /* @__PURE__ */ jsx37(Stack9, { gap: 3, children: integrations.length === 0 ? /* @__PURE__ */ jsx37(Text22, { color: "gray.400", children: "Nenhuma integra\xE7\xE3o declarada." }) : integrations.map((it, idx) => /* @__PURE__ */ jsx37(
5069
- Box20,
5139
+ Box21,
5070
5140
  {
5071
5141
  borderWidth: "1px",
5072
5142
  borderColor: "gray.200",
@@ -5106,7 +5176,7 @@ function CoreCurrency({ model = "Moeda", label = "Multi-moedas", endpoint = "/mo
5106
5176
 
5107
5177
  // src/components/CoreAssistant.tsx
5108
5178
  import { useState as useState14 } from "react";
5109
- import { Box as Box21, Button as Button17, Flex as Flex16, Heading as Heading14, Input as Input9, Stack as Stack11, Text as Text24 } from "@chakra-ui/react";
5179
+ import { Box as Box22, Button as Button17, Flex as Flex16, Heading as Heading14, Input as Input9, Stack as Stack11, Text as Text24 } from "@chakra-ui/react";
5110
5180
  import { useMutation as useMutation6 } from "@tanstack/react-query";
5111
5181
  import { jsx as jsx39, jsxs as jsxs25 } from "react/jsx-runtime";
5112
5182
  function CoreAssistant({ assistantCode, label = "Assistente", entity, endpoint = "/assistant-runs" }) {
@@ -5139,9 +5209,9 @@ function CoreAssistant({ assistantCode, label = "Assistente", entity, endpoint =
5139
5209
  };
5140
5210
  return /* @__PURE__ */ jsxs25(Stack11, { gap: 4, maxW: "560px", children: [
5141
5211
  /* @__PURE__ */ jsx39(Heading14, { size: "md", children: label }),
5142
- /* @__PURE__ */ jsx39(Box21, { borderWidth: "1px", borderColor: "gray.200", borderRadius: "md", bg: "white", p: 4, minH: "240px", children: /* @__PURE__ */ jsxs25(Stack11, { gap: 3, children: [
5212
+ /* @__PURE__ */ jsx39(Box22, { borderWidth: "1px", borderColor: "gray.200", borderRadius: "md", bg: "white", p: 4, minH: "240px", children: /* @__PURE__ */ jsxs25(Stack11, { gap: 3, children: [
5143
5213
  messages.length === 0 ? /* @__PURE__ */ jsx39(Text24, { color: "gray.400", fontSize: "sm", children: "Fa\xE7a uma pergunta ao assistente." }) : messages.map((m, idx) => /* @__PURE__ */ jsx39(Flex16, { justify: m.role === "user" ? "flex-end" : "flex-start", children: /* @__PURE__ */ jsx39(
5144
- Box21,
5214
+ Box22,
5145
5215
  {
5146
5216
  bg: m.role === "user" ? "brand.500" : "gray.100",
5147
5217
  color: m.role === "user" ? "white" : "gray.800",