@praxisui/core 10.0.0-rc.37 → 10.0.0-rc.38

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.
@@ -822,7 +822,7 @@ function resolveControlTypeAlias(value, fallback = FieldControlType.INPUT) {
822
822
  }
823
823
 
824
824
  function normalizeResourceIdentityContract(value) {
825
- if (!isRecord$5(value))
825
+ if (!isRecord$6(value))
826
826
  return null;
827
827
  const keyField = normalizeText$3(value['keyField']);
828
828
  const titleField = normalizeText$3(value['titleField']);
@@ -850,7 +850,7 @@ function normalizeResourceIdentityContract(value) {
850
850
  function resolveResourceIdentityContract(options) {
851
851
  const diagnostics = [];
852
852
  const explicit = normalizeResourceIdentityContract(options.explicitIdentity);
853
- const hasExplicitDeclaration = isRecord$5(options.explicitIdentity);
853
+ const hasExplicitDeclaration = isRecord$6(options.explicitIdentity);
854
854
  if (explicit && explicit.valid !== false) {
855
855
  return {
856
856
  contract: { ...explicit, source: 'explicit' },
@@ -978,7 +978,7 @@ function normalizeResourceIdentityDiagnostics(value) {
978
978
  if (!Array.isArray(value))
979
979
  return [];
980
980
  return value.filter((item) => {
981
- return isRecord$5(item)
981
+ return isRecord$6(item)
982
982
  && isResourceIdentityDiagnosticCode(item['code'])
983
983
  && (item['severity'] === 'info' || item['severity'] === 'warning')
984
984
  && typeof item['message'] === 'string';
@@ -1007,7 +1007,7 @@ function normalizeStringList(value) {
1007
1007
  return [];
1008
1008
  return [...new Set(value.map(normalizeText$3).filter((item) => !!item))];
1009
1009
  }
1010
- function isRecord$5(value) {
1010
+ function isRecord$6(value) {
1011
1011
  return !!value && typeof value === 'object' && !Array.isArray(value);
1012
1012
  }
1013
1013
 
@@ -1180,8 +1180,8 @@ function resolvePraxisMicroVisualizationTone(value, thresholds, fallbackTone) {
1180
1180
  if (value === undefined || value === null || !Array.isArray(thresholds) || thresholds.length === 0) {
1181
1181
  return fallbackTone ? { tone: fallbackTone } : undefined;
1182
1182
  }
1183
- const num = typeof value === 'number' ? value : Number(value);
1184
- const isNum = Number.isFinite(num);
1183
+ const num = toFiniteNumber(value);
1184
+ const isNum = num !== undefined;
1185
1185
  // 1. Pass 1: Correspondencia discreta (equals) tem prioridade maxima
1186
1186
  for (const t of thresholds) {
1187
1187
  if (!t || !t.tone || t.equals === undefined) {
@@ -1190,7 +1190,8 @@ function resolvePraxisMicroVisualizationTone(value, thresholds, fallbackTone) {
1190
1190
  if (t.equals === value || String(t.equals) === String(value)) {
1191
1191
  return { tone: t.tone, label: t.label, matchedThreshold: t };
1192
1192
  }
1193
- if (isNum && Number.isFinite(Number(t.equals)) && Number(t.equals) === num) {
1193
+ const eqNum = toFiniteNumber(t.equals);
1194
+ if (isNum && eqNum !== undefined && eqNum === num) {
1194
1195
  return { tone: t.tone, label: t.label, matchedThreshold: t };
1195
1196
  }
1196
1197
  }
@@ -1367,7 +1368,7 @@ function renderComparisonVisualizationHtml(visualization, options) {
1367
1368
  const rows = points
1368
1369
  .map((point) => {
1369
1370
  const width = percent(point.value, max);
1370
- const formattedVal = `${formatMicroNumber(point.value, options.locale, useCompact)}${suffix}`;
1371
+ const formattedVal = formatVisualizationMetricValue(point.value, options, useCompact, suffix);
1371
1372
  const readout = `${point.label ? `${point.label}: ` : ''}${formattedVal} (${Math.round(Number(width))}%)`;
1372
1373
  return `
1373
1374
  <span class="pfx-micro-viz__row" data-tone="${escapeHtml$1(point.tone ?? visualization.tone ?? 'info')}" data-micro-readout="${escapeHtml$1(readout)}">
@@ -1392,10 +1393,11 @@ function renderStackedBarVisualizationHtml(visualization, options) {
1392
1393
  ? visualization.total
1393
1394
  : Math.max(1, segments.reduce((sum, segment) => sum + Math.max(0, segment.value), 0));
1394
1395
  const suffix = visualization.valueSuffix ?? '';
1396
+ const useCompact = visualization.compactValue === true;
1395
1397
  const bars = segments
1396
1398
  .map((segment) => {
1397
1399
  const pctStr = percent(segment.value, total);
1398
- const formattedVal = `${formatMicroNumber(segment.value, options.locale)}${suffix}`;
1400
+ const formattedVal = formatVisualizationMetricValue(segment.value, options, useCompact, suffix);
1399
1401
  const readout = `${segment.label ? `${segment.label}: ` : ''}${formattedVal} (${Math.round(Number(pctStr))}%)`;
1400
1402
  return `
1401
1403
  <span
@@ -1409,7 +1411,7 @@ function renderStackedBarVisualizationHtml(visualization, options) {
1409
1411
  .join('');
1410
1412
  const meta = segments
1411
1413
  .slice(0, 3)
1412
- .map((segment) => `<span>${escapeHtml$1(segment.label ?? '')}: ${escapeHtml$1(formatMicroNumber(segment.value, options.locale))}</span>`)
1414
+ .map((segment) => `<span>${escapeHtml$1(segment.label ?? '')}: ${escapeHtml$1(formatVisualizationMetricValue(segment.value, options, useCompact, suffix))}</span>`)
1413
1415
  .join('');
1414
1416
  return `
1415
1417
  <span class="pfx-micro-viz pfx-micro-viz__stacked" role="img" aria-label="${escapeHtml$1(visualization.ariaLabel ?? visualization.fallbackText)}">
@@ -1467,26 +1469,26 @@ function renderBulletVisualizationHtml(visualization, options) {
1467
1469
  <div class="pfx-micro-bullet__top">
1468
1470
  <span class="pfx-micro-bullet__label">${escapeHtml$1(visualization.fallbackText)}</span>
1469
1471
  <span class="pfx-micro-bullet__value">
1470
- ${escapeHtml$1(formatMicroNumber(currentValue, options.locale))}
1471
- ${target === undefined ? '' : `<span class="pfx-micro-bullet__target-val">/ Target: ${escapeHtml$1(formatMicroNumber(target, options.locale))}</span>`}
1472
+ ${escapeHtml$1(formatVisualizationMetricValue(currentValue, options, false, suffix))}
1473
+ ${target === undefined ? '' : `<span class="pfx-micro-bullet__target-val">/ Target: ${escapeHtml$1(formatVisualizationMetricValue(target, options, false, suffix))}</span>`}
1472
1474
  </span>
1473
1475
  </div>`;
1474
1476
  const bottomHtml = isTable ? '' : `
1475
1477
  <div class="pfx-micro-bullet__bottom">
1476
- <span>${escapeHtml$1(formatMicroNumber(visualization.baseline ?? 0, options.locale))}</span>
1477
- <span>${escapeHtml$1(formatMicroNumber(max, options.locale))}</span>
1478
+ <span>${escapeHtml$1(formatVisualizationMetricValue(visualization.baseline ?? 0, options, false, suffix))}</span>
1479
+ <span>${escapeHtml$1(formatVisualizationMetricValue(max, options, false, suffix))}</span>
1478
1480
  </div>`;
1479
1481
  const showCompactValue = isTable && visualization.compactValue !== false;
1480
1482
  const useCompactNotation = visualization.compactValue === true;
1481
1483
  const compactValueHtml = showCompactValue
1482
- ? `<span class="pfx-micro-bullet__compact-value">${escapeHtml$1(formatMicroNumber(currentValue, options.locale, useCompactNotation))}${escapeHtml$1(suffix)}</span>`
1484
+ ? `<span class="pfx-micro-bullet__compact-value">${escapeHtml$1(formatVisualizationMetricValue(currentValue, options, useCompactNotation, suffix))}</span>`
1483
1485
  : '';
1484
- const currentStr = `${formatMicroNumber(currentValue, options.locale)}${suffix}`;
1486
+ const currentStr = formatVisualizationMetricValue(currentValue, options, false, suffix);
1485
1487
  const diff = target !== undefined ? currentValue - target : undefined;
1486
1488
  const diffSign = diff !== undefined && diff > 0 ? '+' : '';
1487
1489
  const bulletReadout = target !== undefined && diff !== undefined
1488
- ? `${currentStr} / Target ${formatMicroNumber(target, options.locale)}${suffix} (${diffSign}${formatMicroNumber(diff, options.locale)}${suffix})`
1489
- : `${currentStr} / ${formatMicroNumber(max, options.locale)}${suffix}`;
1490
+ ? `${currentStr} / Target ${formatVisualizationMetricValue(target, options, false, suffix)} (${diffSign}${formatVisualizationMetricValue(diff, options, false, suffix)})`
1491
+ : `${currentStr} / ${formatVisualizationMetricValue(max, options, false, suffix)}`;
1490
1492
  const tabIndexAttr = isTable ? '' : ' tabindex="0"';
1491
1493
  return `
1492
1494
  <span class="pfx-micro-viz pfx-micro-viz__bullet"${tabIndexAttr} data-tone="${escapeHtml$1(visualization.tone ?? 'info')}" data-micro-readout="${escapeHtml$1(bulletReadout)}" role="img" aria-label="${escapeHtml$1(visualization.ariaLabel ?? visualization.fallbackText)}">
@@ -1515,7 +1517,7 @@ function renderDeltaVisualizationHtml(visualization, options) {
1515
1517
  const valueSuffix = visualization.valueSuffix ?? '';
1516
1518
  const text = value === undefined
1517
1519
  ? visualization.fallbackText
1518
- : `${formatMicroNumber(Math.abs(value), options.locale)}${valueSuffix}`;
1520
+ : formatVisualizationMetricValue(Math.abs(value), options, visualization.compactValue === true, valueSuffix);
1519
1521
  const directionLabel = direction === 'up'
1520
1522
  ? 'up'
1521
1523
  : direction === 'down'
@@ -1526,9 +1528,9 @@ function renderDeltaVisualizationHtml(visualization, options) {
1526
1528
  const baseline = toFiniteNumber(visualization.baseline);
1527
1529
  const isTable = visualization.surface === 'table-cell';
1528
1530
  const deltaReadout = target !== undefined
1529
- ? `Target ${formatMicroNumber(target, options.locale)}${valueSuffix}`
1531
+ ? `Target ${formatVisualizationMetricValue(target, options, false, valueSuffix)}`
1530
1532
  : baseline !== undefined
1531
- ? `Base ${formatMicroNumber(baseline, options.locale)}${valueSuffix}`
1533
+ ? `Base ${formatVisualizationMetricValue(baseline, options, false, valueSuffix)}`
1532
1534
  : null;
1533
1535
  const readoutAttr = deltaReadout
1534
1536
  ? `${isTable ? '' : ' tabindex="0"'} data-micro-readout="${escapeHtml$1(deltaReadout)}"`
@@ -1546,7 +1548,27 @@ function percent(value, total) {
1546
1548
  return Math.max(0, Math.min(100, (value / total) * 100)).toFixed(2);
1547
1549
  }
1548
1550
  function toFiniteNumber(value) {
1549
- return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
1551
+ if (typeof value === 'number') {
1552
+ return Number.isFinite(value) ? value : undefined;
1553
+ }
1554
+ if (typeof value === 'string') {
1555
+ const trimmed = value.trim();
1556
+ if (!trimmed) {
1557
+ return undefined;
1558
+ }
1559
+ const parsed = Number(trimmed);
1560
+ return Number.isFinite(parsed) ? parsed : undefined;
1561
+ }
1562
+ return undefined;
1563
+ }
1564
+ function formatVisualizationMetricValue(value, options, compactValue = false, suffix = '') {
1565
+ if (typeof options.formatValue === 'function') {
1566
+ const custom = options.formatValue(value, compactValue);
1567
+ if (typeof custom === 'string' && custom.trim().length > 0) {
1568
+ return suffix && !custom.endsWith(suffix) ? `${custom}${suffix}` : custom;
1569
+ }
1570
+ }
1571
+ return `${formatMicroNumber(value, options.locale, compactValue)}${suffix}`;
1550
1572
  }
1551
1573
  function formatMicroNumber(value, locale, compactValue = false) {
1552
1574
  if (compactValue && Math.abs(value) >= 1000) {
@@ -1630,16 +1652,21 @@ function normalizeNumericEntries(value) {
1630
1652
  }
1631
1653
  return value
1632
1654
  .map((item) => {
1633
- if (typeof item === 'number') {
1634
- return Number.isFinite(item) ? { value: item } : null;
1655
+ if (typeof item === 'number' || typeof item === 'string') {
1656
+ const num = toFiniteNumber(item);
1657
+ return num !== undefined ? { value: num } : null;
1658
+ }
1659
+ if (!item || typeof item !== 'object') {
1660
+ return null;
1635
1661
  }
1636
- if (!item || typeof item !== 'object' || !Number.isFinite(item.value)) {
1662
+ const num = toFiniteNumber(item.value);
1663
+ if (num === undefined) {
1637
1664
  return null;
1638
1665
  }
1639
1666
  const label = normalizeText$2(item.label);
1640
1667
  const tone = normalizeEnum$1(item.tone, VISUALIZATION_TONES);
1641
1668
  return {
1642
- value: item.value,
1669
+ value: num,
1643
1670
  ...(label ? { label } : {}),
1644
1671
  ...(tone ? { tone } : {}),
1645
1672
  };
@@ -1655,7 +1682,7 @@ function normalizeVisualizationItem(item) {
1655
1682
  const icon = normalizeText$2(item.icon);
1656
1683
  const state = normalizeText$2(item.state);
1657
1684
  const tone = normalizeEnum$1(item.tone, VISUALIZATION_TONES);
1658
- const normalizedValue = Number.isFinite(item.value) ? item.value : undefined;
1685
+ const normalizedValue = toFiniteNumber(item.value);
1659
1686
  if (!id && !label && normalizedValue === undefined && !icon && !state && !tone) {
1660
1687
  return null;
1661
1688
  }
@@ -1669,7 +1696,8 @@ function normalizeVisualizationItem(item) {
1669
1696
  };
1670
1697
  }
1671
1698
  function normalizeNumber(value, key) {
1672
- return Number.isFinite(value) ? { [key]: value } : undefined;
1699
+ const num = toFiniteNumber(value);
1700
+ return num !== undefined ? { [key]: num } : undefined;
1673
1701
  }
1674
1702
  function normalizeEnum$1(value, allowed) {
1675
1703
  if (typeof value !== 'string') {
@@ -1704,7 +1732,7 @@ function renderRadialVisualizationHtml(visualization, options) {
1704
1732
  const externalText = isTable
1705
1733
  ? `<span class="pfx-micro-radial-value">${escapeHtml$1(pctText)}</span>`
1706
1734
  : '';
1707
- const radialReadout = `${formatMicroNumber(value, options.locale)}${suffix} / ${formatMicroNumber(total, options.locale)}${suffix} (${pctText})`;
1735
+ const radialReadout = `${formatVisualizationMetricValue(value, options, false, suffix)} / ${formatVisualizationMetricValue(total, options, false, suffix)} (${pctText})`;
1708
1736
  const tabIndexAttr = isTable ? '' : ' tabindex="0"';
1709
1737
  return `
1710
1738
  <span class="pfx-micro-viz pfx-micro-viz__radial"${tabIndexAttr} data-tone="${escapeHtml$1(tone)}" data-micro-readout="${escapeHtml$1(radialReadout)}" role="img" aria-label="${escapeHtml$1(aria)}">
@@ -1726,10 +1754,13 @@ function renderHarveyBallVisualizationHtml(visualization, options) {
1726
1754
  const tone = visualization.tone ?? 'info';
1727
1755
  const isTable = visualization.surface === 'table-cell';
1728
1756
  const tabIndexAttr = isTable ? '' : ' tabindex="0"';
1757
+ const suffix = visualization.valueSuffix ?? '';
1729
1758
  const strokeLength = pct * 0.50265;
1730
1759
  const dashArray = `${strokeLength.toFixed(3)} 50.265`;
1731
1760
  const aria = visualization.ariaLabel ?? `${visualization.fallbackText} (${Math.round(pct)}%)`;
1732
- const harveyReadout = `${formatMicroNumber(value, options.locale)}/${formatMicroNumber(total, options.locale)} (${Math.round(pct)}%)`;
1761
+ const formattedValue = formatVisualizationMetricValue(value, options, false, suffix);
1762
+ const formattedTotal = formatVisualizationMetricValue(total, options, false, suffix);
1763
+ const harveyReadout = `${formattedValue}/${formattedTotal} (${Math.round(pct)}%)`;
1733
1764
  return `
1734
1765
  <span class="pfx-micro-viz pfx-micro-viz__harvey"${tabIndexAttr} data-tone="${escapeHtml$1(tone)}" data-micro-readout="${escapeHtml$1(harveyReadout)}" role="img" aria-label="${escapeHtml$1(aria)}">
1735
1766
  <svg class="pfx-micro-harvey-svg" viewBox="0 0 36 36">
@@ -1737,9 +1768,9 @@ function renderHarveyBallVisualizationHtml(visualization, options) {
1737
1768
  <circle class="pfx-micro-harvey-svg__bar" cx="18" cy="18" r="8" stroke-dasharray="${dashArray}" transform="rotate(-90 18 18)" />
1738
1769
  </svg>
1739
1770
  <span class="pfx-micro-harvey-fraction">
1740
- <strong>${escapeHtml$1(formatMicroNumber(value, options.locale))}</strong>
1771
+ <strong>${escapeHtml$1(formattedValue)}</strong>
1741
1772
  <span class="pfx-separator">/</span>
1742
- <span class="pfx-total">${escapeHtml$1(formatMicroNumber(total, options.locale))}</span>
1773
+ <span class="pfx-total">${escapeHtml$1(formattedTotal)}</span>
1743
1774
  </span>
1744
1775
  </span>`;
1745
1776
  }
@@ -1788,7 +1819,7 @@ function renderTrendScrubLayerHtml(points, coords, width, height, visualization,
1788
1819
  ? resolvePraxisMicroVisualizationTone(point.value, visualization.thresholds)?.tone ?? defaultTone
1789
1820
  : defaultTone);
1790
1821
  const labelPrefix = point.label ? `${point.label}: ` : `#${index + 1}: `;
1791
- const readout = `${labelPrefix}${formatMicroNumber(point.value, options.locale)}${suffix}`;
1822
+ const readout = `${labelPrefix}${formatVisualizationMetricValue(point.value, options, visualization.compactValue === true, suffix)}`;
1792
1823
  return `<span class="pfx-micro-trend__scrub-slice" data-tone="${escapeHtml$1(pointTone)}" data-micro-readout="${escapeHtml$1(readout)}" style="--pfx-scrub-x:${xPct}%;--pfx-scrub-y:${yPct}%;"></span>`;
1793
1824
  })
1794
1825
  .join('');
@@ -1830,14 +1861,15 @@ function renderLineVisualizationHtml(visualization, options) {
1830
1861
  const isTable = visualization.surface === 'table-cell';
1831
1862
  const firstPoint = points[0];
1832
1863
  const lastPoint = points[points.length - 1];
1864
+ const suffix = visualization.valueSuffix ?? '';
1833
1865
  const leftHtml = isTable ? '' : `
1834
1866
  <div class="pfx-micro-trend__label-col pfx-micro-trend__label-col--start">
1835
- <span class="pfx-micro-trend__value">${escapeHtml$1(formatMicroNumber(firstPoint.value, options.locale))}</span>
1867
+ <span class="pfx-micro-trend__value">${escapeHtml$1(formatVisualizationMetricValue(firstPoint.value, options, visualization.compactValue === true, suffix))}</span>
1836
1868
  ${firstPoint.label ? `<span class="pfx-micro-trend__label">${escapeHtml$1(firstPoint.label)}</span>` : ''}
1837
1869
  </div>`;
1838
1870
  const rightHtml = isTable ? '' : `
1839
1871
  <div class="pfx-micro-trend__label-col pfx-micro-trend__label-col--end">
1840
- <span class="pfx-micro-trend__value">${escapeHtml$1(formatMicroNumber(lastPoint.value, options.locale))}</span>
1872
+ <span class="pfx-micro-trend__value">${escapeHtml$1(formatVisualizationMetricValue(lastPoint.value, options, visualization.compactValue === true, suffix))}</span>
1841
1873
  ${lastPoint.label ? `<span class="pfx-micro-trend__label">${escapeHtml$1(lastPoint.label)}</span>` : ''}
1842
1874
  </div>`;
1843
1875
  return `
@@ -1893,14 +1925,15 @@ function renderAreaVisualizationHtml(visualization, options) {
1893
1925
  const isTable = visualization.surface === 'table-cell';
1894
1926
  const firstPoint = points[0];
1895
1927
  const lastPoint = points[points.length - 1];
1928
+ const suffix = visualization.valueSuffix ?? '';
1896
1929
  const leftHtml = isTable ? '' : `
1897
1930
  <div class="pfx-micro-trend__label-col pfx-micro-trend__label-col--start">
1898
- <span class="pfx-micro-trend__value">${escapeHtml$1(formatMicroNumber(firstPoint.value, options.locale))}</span>
1931
+ <span class="pfx-micro-trend__value">${escapeHtml$1(formatVisualizationMetricValue(firstPoint.value, options, visualization.compactValue === true, suffix))}</span>
1899
1932
  ${firstPoint.label ? `<span class="pfx-micro-trend__label">${escapeHtml$1(firstPoint.label)}</span>` : ''}
1900
1933
  </div>`;
1901
1934
  const rightHtml = isTable ? '' : `
1902
1935
  <div class="pfx-micro-trend__label-col pfx-micro-trend__label-col--end">
1903
- <span class="pfx-micro-trend__value">${escapeHtml$1(formatMicroNumber(lastPoint.value, options.locale))}</span>
1936
+ <span class="pfx-micro-trend__value">${escapeHtml$1(formatVisualizationMetricValue(lastPoint.value, options, visualization.compactValue === true, suffix))}</span>
1904
1937
  ${lastPoint.label ? `<span class="pfx-micro-trend__label">${escapeHtml$1(lastPoint.label)}</span>` : ''}
1905
1938
  </div>`;
1906
1939
  return `
@@ -1946,14 +1979,15 @@ function renderColumnVisualizationHtml(visualization, options) {
1946
1979
  const isTable = visualization.surface === 'table-cell';
1947
1980
  const firstPoint = points[0];
1948
1981
  const lastPoint = points[points.length - 1];
1982
+ const suffix = visualization.valueSuffix ?? '';
1949
1983
  const leftHtml = isTable ? '' : `
1950
1984
  <div class="pfx-micro-trend__label-col pfx-micro-trend__label-col--start">
1951
- <span class="pfx-micro-trend__value">${escapeHtml$1(formatMicroNumber(firstPoint.value, options.locale))}</span>
1985
+ <span class="pfx-micro-trend__value">${escapeHtml$1(formatVisualizationMetricValue(firstPoint.value, options, visualization.compactValue === true, suffix))}</span>
1952
1986
  ${firstPoint.label ? `<span class="pfx-micro-trend__label">${escapeHtml$1(firstPoint.label)}</span>` : ''}
1953
1987
  </div>`;
1954
1988
  const rightHtml = isTable ? '' : `
1955
1989
  <div class="pfx-micro-trend__label-col pfx-micro-trend__label-col--end">
1956
- <span class="pfx-micro-trend__value">${escapeHtml$1(formatMicroNumber(lastPoint.value, options.locale))}</span>
1990
+ <span class="pfx-micro-trend__value">${escapeHtml$1(formatVisualizationMetricValue(lastPoint.value, options, visualization.compactValue === true, suffix))}</span>
1957
1991
  ${lastPoint.label ? `<span class="pfx-micro-trend__label">${escapeHtml$1(lastPoint.label)}</span>` : ''}
1958
1992
  </div>`;
1959
1993
  return `
@@ -1993,20 +2027,21 @@ function renderProcessFlowVisualizationHtml(visualization, options) {
1993
2027
  const itemState = item.state ?? '';
1994
2028
  const isLast = index === items.length - 1;
1995
2029
  const itemLabel = stepLabels[index];
2030
+ const normalizedIcon = item.icon ? item.icon.replace(/-/g, '_') : undefined;
1996
2031
  const label = !isTable && item.label ? `<span class="pfx-micro-step__label"${labelInlineStyle}>${escapeHtml$1(item.label)}</span>` : '';
1997
2032
  const isActiveStep = itemState === 'active' ||
1998
2033
  itemState === 'current' ||
1999
2034
  itemState === 'in_progress' ||
2000
- item.icon === 'sync' ||
2001
- item.icon === 'pending' ||
2002
- item.icon === 'pending_actions' ||
2003
- item.icon === 'schedule' ||
2035
+ normalizedIcon === 'sync' ||
2036
+ normalizedIcon === 'pending' ||
2037
+ normalizedIcon === 'pending_actions' ||
2038
+ normalizedIcon === 'schedule' ||
2004
2039
  (!itemState && itemTone === 'warning');
2005
2040
  const stepReadout = `${index + 1}/${items.length} · ${itemLabel}`;
2006
2041
  const connector = !isLast ? `<span class="pfx-micro-step__connector" data-tone="${escapeHtml$1(itemTone)}"></span>` : '';
2007
2042
  const stepCircle = `
2008
2043
  <span class="pfx-micro-step__node" data-tone="${escapeHtml$1(itemTone)}"${isActiveStep ? ' data-active="true"' : ''} aria-hidden="true">
2009
- ${item.icon ? `<span class="material-icons pfx-micro-step__icon" aria-hidden="true">${escapeHtml$1(item.icon)}</span>` : `${index + 1}`}
2044
+ ${normalizedIcon ? `<span class="material-icons pfx-micro-step__icon" aria-hidden="true">${escapeHtml$1(normalizedIcon)}</span>` : `${index + 1}`}
2010
2045
  </span>`;
2011
2046
  return `
2012
2047
  <div class="pfx-micro-step" data-state="${escapeHtml$1(itemState)}" data-tone="${escapeHtml$1(itemTone)}">
@@ -8306,25 +8341,45 @@ function uiLayoutJsonIdentity(value) {
8306
8341
  throw invalid();
8307
8342
  }
8308
8343
  }
8309
- function copyJson(value, sorted) {
8344
+ /** Closed document transport budget shared by page and native child codecs.
8345
+ * Preserves raw authorship; matching the budget does not attest schema or authority.
8346
+ */
8347
+ function cloneBoundedUiLayoutJsonDocument(value) {
8348
+ if (value === null || typeof value !== 'object' || Array.isArray(value))
8349
+ throw invalid();
8350
+ const copy = copyJson(value, false, true);
8351
+ if (new TextEncoder().encode(JSON.stringify(copy)).length > 256 * 1024)
8352
+ throw invalid();
8353
+ return copy;
8354
+ }
8355
+ function copyJson(value, sorted, bounded = false) {
8310
8356
  const result = {};
8311
8357
  const parents = new Set();
8312
- const stack = [{ value, parent: result, key: 'value' }];
8358
+ const stack = [{ value, parent: result, key: 'value', depth: 1 }];
8359
+ let minimumBytes = 0;
8313
8360
  while (stack.length) {
8314
8361
  const task = stack.pop();
8315
8362
  const item = task.value;
8363
+ if (bounded && minimumBytes > 256 * 1024)
8364
+ throw invalid();
8316
8365
  if (task.exit) {
8317
8366
  parents.delete(item);
8318
8367
  continue;
8319
8368
  }
8320
8369
  if (item === null || typeof item === 'string' || typeof item === 'boolean'
8321
8370
  || typeof item === 'number' && Number.isFinite(item)) {
8371
+ if (bounded)
8372
+ minimumBytes += typeof item === 'string' ? utf8Bytes(item) + 2 : String(item).length;
8322
8373
  put(task.parent, task.key, item);
8323
8374
  continue;
8324
8375
  }
8325
8376
  if (typeof item !== 'object' || item === null || parents.has(item)
8326
8377
  || Object.getOwnPropertySymbols(item).length)
8327
8378
  throw invalid();
8379
+ if (bounded && task.depth > 64)
8380
+ throw invalid();
8381
+ if (bounded)
8382
+ minimumBytes += 2;
8328
8383
  const array = Array.isArray(item);
8329
8384
  if (!array && ![Object.prototype, null].includes(Object.getPrototypeOf(item)))
8330
8385
  throw invalid();
@@ -8343,6 +8398,8 @@ function copyJson(value, sorted) {
8343
8398
  keys.sort();
8344
8399
  for (const key of keys) {
8345
8400
  const descriptor = descriptors[key];
8401
+ if (bounded && !array)
8402
+ minimumBytes += utf8Bytes(key) + 3;
8346
8403
  if (!descriptor.enumerable || !Object.hasOwn(descriptor, 'value'))
8347
8404
  throw invalid();
8348
8405
  }
@@ -8352,7 +8409,7 @@ function copyJson(value, sorted) {
8352
8409
  stack.push({ ...task, exit: true });
8353
8410
  for (let index = keys.length - 1; index >= 0; index--) {
8354
8411
  const key = keys[index];
8355
- stack.push({ value: descriptors[key].value, parent: copy, key });
8412
+ stack.push({ value: descriptors[key].value, parent: copy, key, depth: task.depth + 1 });
8356
8413
  }
8357
8414
  }
8358
8415
  return result.value;
@@ -8362,6 +8419,19 @@ function put(target, key, value) {
8362
8419
  Object.defineProperty(target, key, { value, enumerable: true, configurable: true, writable: true });
8363
8420
  }
8364
8421
  function invalid() { return new TypeError('UI layout requires lossless JSON values.'); }
8422
+ function utf8Bytes(value) {
8423
+ for (let index = 0; index < value.length; index++) {
8424
+ const unit = value.charCodeAt(index);
8425
+ if (unit >= 0xd800 && unit <= 0xdbff) {
8426
+ const next = value.charCodeAt(++index);
8427
+ if (!(next >= 0xdc00 && next <= 0xdfff))
8428
+ throw invalid();
8429
+ }
8430
+ else if (unit >= 0xdc00 && unit <= 0xdfff)
8431
+ throw invalid();
8432
+ }
8433
+ return new TextEncoder().encode(value).length;
8434
+ }
8365
8435
 
8366
8436
  const PRAXIS_I18N_CONFIG = new InjectionToken('PRAXIS_I18N_CONFIG', {
8367
8437
  factory: () => ({}),
@@ -13160,11 +13230,22 @@ function mapFieldDefinitionToMetadata(field) {
13160
13230
  }
13161
13231
  if (field.options) {
13162
13232
  const mapped = field.options.map((opt) => {
13163
- const { key, value, ...rest } = opt ?? {};
13233
+ if (opt !== null && typeof opt === 'object') {
13234
+ const { key, value, text, label, ...rest } = opt;
13235
+ const resolvedValue = key !== undefined ? key : value;
13236
+ const resolvedText = key !== undefined
13237
+ ? (text ?? label ?? value)
13238
+ : (text ?? label ?? (value !== undefined ? String(value) : undefined));
13239
+ return {
13240
+ ...rest,
13241
+ ...(label !== undefined ? { label } : {}),
13242
+ value: resolvedValue,
13243
+ text: resolvedText,
13244
+ };
13245
+ }
13164
13246
  return {
13165
- ...rest,
13166
- value: key,
13167
- text: value,
13247
+ value: opt,
13248
+ text: opt !== undefined && opt !== null ? String(opt) : '',
13168
13249
  };
13169
13250
  });
13170
13251
  metadata.options = mapped;
@@ -13262,6 +13343,682 @@ function mapFieldDefinitionToMetadata(field) {
13262
13343
  function mapFieldDefinitionsToMetadata(fields) {
13263
13344
  return fields.map(mapFieldDefinitionToMetadata);
13264
13345
  }
13346
+ /**
13347
+ * Humaniza um identificador técnico de campo (ex.: `payrollCycleStatus` -> `Payroll Cycle Status`)
13348
+ * quando o resumo de `/schemas/catalog` não publicar um `label` explícito.
13349
+ */
13350
+ function humanizeCatalogFieldName(name) {
13351
+ const trimmed = String(name || '').trim();
13352
+ if (!trimmed)
13353
+ return '';
13354
+ const base = !/[a-z]/.test(trimmed) ? trimmed.toLowerCase() : trimmed;
13355
+ return base
13356
+ .replace(/([a-z0-9])([A-Z])/g, '$1 $2')
13357
+ .replace(/[_.-]+/g, ' ')
13358
+ .replace(/\s+/g, ' ')
13359
+ .trim()
13360
+ .replace(/\b\w/g, (char) => char.toUpperCase());
13361
+ }
13362
+ /**
13363
+ * Converte resumos de campos publicados em `/schemas/catalog` (`responseFields` ou `filterFields`)
13364
+ * em `FieldMetadata[]` enriquecidos com `type`, `format`, `description`, `controlType`, `options`
13365
+ * (para `enumValues` e campos booleanos), `required` e `validators` (`min`, `max`, `minLength`,
13366
+ * `maxLength`, `pattern`).
13367
+ */
13368
+ function mapCatalogFieldsToMetadata(fields) {
13369
+ if (!Array.isArray(fields) || fields.length === 0) {
13370
+ return [];
13371
+ }
13372
+ const seen = new Set();
13373
+ const result = [];
13374
+ for (const raw of fields) {
13375
+ const name = typeof raw === 'string'
13376
+ ? raw.trim()
13377
+ : String(raw?.name ?? '').trim();
13378
+ if (!name || seen.has(name))
13379
+ continue;
13380
+ seen.add(name);
13381
+ const isObj = typeof raw === 'object' && raw !== null;
13382
+ const label = isObj
13383
+ ? String(raw.label || '').trim() || humanizeCatalogFieldName(name)
13384
+ : humanizeCatalogFieldName(name);
13385
+ const type = isObj ? String(raw.type || '').trim() : '';
13386
+ const format = isObj ? String(raw.format || '').trim() : '';
13387
+ const description = isObj ? String(raw.description || '').trim() : '';
13388
+ const rawControlType = isObj ? String(raw.controlType || '').trim() : '';
13389
+ const enumValues = isObj && Array.isArray(raw.enumValues)
13390
+ ? raw.enumValues.filter((v) => typeof v === 'string' && v.trim().length > 0)
13391
+ : [];
13392
+ const typeLower = type.toLowerCase();
13393
+ const formatLower = format.toLowerCase();
13394
+ const isBoolean = typeLower === 'boolean' || rawControlType.toLowerCase() === 'toggle';
13395
+ const controlType = rawControlType
13396
+ ? resolveControlTypeAlias(rawControlType, FieldControlType.INPUT)
13397
+ : enumValues.length > 0
13398
+ ? FieldControlType.SELECT
13399
+ : isBoolean
13400
+ ? FieldControlType.TOGGLE
13401
+ : formatLower === 'date' ||
13402
+ formatLower === 'local-date' ||
13403
+ typeLower === 'date'
13404
+ ? FieldControlType.DATE_PICKER
13405
+ : formatLower === 'date-time' ||
13406
+ formatLower === 'datetime' ||
13407
+ formatLower === 'instant' ||
13408
+ typeLower === 'datetime'
13409
+ ? FieldControlType.DATETIME_LOCAL_INPUT
13410
+ : formatLower === 'currency' || typeLower === 'currency'
13411
+ ? FieldControlType.CURRENCY_INPUT
13412
+ : typeLower === 'number' ||
13413
+ typeLower === 'integer' ||
13414
+ typeLower === 'decimal'
13415
+ ? FieldControlType.NUMERIC_TEXT_BOX
13416
+ : FieldControlType.INPUT;
13417
+ const options = enumValues.length > 0
13418
+ ? enumValues.map((v) => ({ text: v, value: v }))
13419
+ : isBoolean
13420
+ ? [
13421
+ { text: 'true', value: true },
13422
+ { text: 'false', value: false },
13423
+ ]
13424
+ : undefined;
13425
+ const required = isObj && typeof raw.required === 'boolean' ? raw.required : undefined;
13426
+ const min = isObj && typeof raw.minimum === 'number' && !Number.isNaN(raw.minimum)
13427
+ ? raw.minimum
13428
+ : undefined;
13429
+ const max = isObj && typeof raw.maximum === 'number' && !Number.isNaN(raw.maximum)
13430
+ ? raw.maximum
13431
+ : undefined;
13432
+ const minLength = isObj && typeof raw.minLength === 'number' && !Number.isNaN(raw.minLength)
13433
+ ? raw.minLength
13434
+ : undefined;
13435
+ const maxLength = isObj && typeof raw.maxLength === 'number' && !Number.isNaN(raw.maxLength)
13436
+ ? raw.maxLength
13437
+ : undefined;
13438
+ const pattern = isObj && typeof raw.pattern === 'string' && raw.pattern.trim().length > 0
13439
+ ? raw.pattern.trim()
13440
+ : undefined;
13441
+ const validators = {};
13442
+ if (required === true)
13443
+ validators.required = true;
13444
+ if (min !== undefined)
13445
+ validators.min = min;
13446
+ if (max !== undefined)
13447
+ validators.max = max;
13448
+ if (minLength !== undefined)
13449
+ validators.minLength = minLength;
13450
+ if (maxLength !== undefined)
13451
+ validators.maxLength = maxLength;
13452
+ if (pattern !== undefined)
13453
+ validators.pattern = pattern;
13454
+ result.push({
13455
+ name,
13456
+ label,
13457
+ controlType,
13458
+ ...(type ? { type, dataType: type } : {}),
13459
+ ...(format ? { format } : {}),
13460
+ ...(description ? { description } : {}),
13461
+ ...(options ? { options } : {}),
13462
+ ...(required !== undefined ? { required } : {}),
13463
+ ...(min !== undefined ? { min } : {}),
13464
+ ...(max !== undefined ? { max } : {}),
13465
+ ...(minLength !== undefined ? { minLength } : {}),
13466
+ ...(maxLength !== undefined ? { maxLength } : {}),
13467
+ ...(pattern !== undefined ? { pattern } : {}),
13468
+ ...(Object.keys(validators).length > 0 ? { validators } : {}),
13469
+ });
13470
+ }
13471
+ return result;
13472
+ }
13473
+ const DOMAIN_SEMANTIC_SUCCESS_TOKENS = new Set([
13474
+ 'ATIVO',
13475
+ 'ATIVOS',
13476
+ 'ATIVA',
13477
+ 'ATIVAS',
13478
+ 'TRUE',
13479
+ '1',
13480
+ 'APROVADO',
13481
+ 'APROVADA',
13482
+ 'CONCLUIDO',
13483
+ 'CONCLUIDA',
13484
+ 'FINALIZADO',
13485
+ 'FINALIZADA',
13486
+ 'PAGO',
13487
+ 'PAGA',
13488
+ 'QUITADO',
13489
+ 'QUITADA',
13490
+ 'LIBERADO',
13491
+ 'LIBERADA',
13492
+ 'REGULAR',
13493
+ 'NORMAL',
13494
+ 'BAIXA',
13495
+ 'LOW',
13496
+ 'VIGENTE',
13497
+ 'ABERTO',
13498
+ 'ABERTA',
13499
+ 'DEFERIDO',
13500
+ 'DEFERIDA',
13501
+ 'HOMOLOGADO',
13502
+ 'HOMOLOGADA',
13503
+ 'SUCESSO',
13504
+ 'OK',
13505
+ 'ACTIVE',
13506
+ 'APPROVED',
13507
+ 'COMPLETED',
13508
+ 'FINISHED',
13509
+ 'PAID',
13510
+ 'SUCCESS',
13511
+ 'ENABLED',
13512
+ 'DONE',
13513
+ 'VALID',
13514
+ 'VERIFIED',
13515
+ ]);
13516
+ const DOMAIN_SEMANTIC_WARNING_TOKENS = new Set([
13517
+ 'PENDENTE',
13518
+ 'PENDENTES',
13519
+ 'EM_ANALISE',
13520
+ 'ANALISE',
13521
+ 'AGUARDANDO',
13522
+ 'ANDAMENTO',
13523
+ 'EM_ANDAMENTO',
13524
+ 'PROGRESSO',
13525
+ 'PROGRESS',
13526
+ 'IN_PROGRESS',
13527
+ 'FERIAS',
13528
+ 'AFASTADO',
13529
+ 'AFASTADA',
13530
+ 'LICENCA',
13531
+ 'LEAVE',
13532
+ 'MEDIA',
13533
+ 'MEDIUM',
13534
+ 'MODERADO',
13535
+ 'MODERADA',
13536
+ 'RASCUNHO',
13537
+ 'PAUSADO',
13538
+ 'PAUSADA',
13539
+ 'ALERTA',
13540
+ 'ATENCAO',
13541
+ 'REVISAO',
13542
+ 'EM_REVISAO',
13543
+ 'PARCIAL',
13544
+ 'PENDING',
13545
+ 'REVIEW',
13546
+ 'IN_REVIEW',
13547
+ 'WAITING',
13548
+ 'DRAFT',
13549
+ 'PAUSED',
13550
+ 'WARNING',
13551
+ 'PARTIAL',
13552
+ ]);
13553
+ const DOMAIN_SEMANTIC_DANGER_TOKENS = new Set([
13554
+ 'CANCELADO',
13555
+ 'CANCELADOS',
13556
+ 'CANCELADA',
13557
+ 'DESATIVADO',
13558
+ 'DESATIVADA',
13559
+ 'FALSE',
13560
+ '0',
13561
+ 'SUSPENSO',
13562
+ 'SUSPENSA',
13563
+ 'SUSPENDED',
13564
+ 'REJEITADO',
13565
+ 'REJEITADA',
13566
+ 'RECUSADO',
13567
+ 'RECUSADA',
13568
+ 'INDEFERIDO',
13569
+ 'INDEFERIDA',
13570
+ 'ATRASADO',
13571
+ 'ATRASADA',
13572
+ 'VENCIDO',
13573
+ 'VENCIDA',
13574
+ 'ERRO',
13575
+ 'FALHA',
13576
+ 'BLOQUEADO',
13577
+ 'BLOQUEADA',
13578
+ 'INATIVO',
13579
+ 'INATIVOS',
13580
+ 'INATIVA',
13581
+ 'EXPIRADO',
13582
+ 'EXPIRADA',
13583
+ 'ESTORNADO',
13584
+ 'CRITICO',
13585
+ 'CRITICA',
13586
+ 'ALTA',
13587
+ 'HIGH',
13588
+ 'DEMITIDO',
13589
+ 'DEMITIDA',
13590
+ 'EXONERADO',
13591
+ 'EXONERADA',
13592
+ 'DESLIGADO',
13593
+ 'DESLIGADA',
13594
+ 'ENCERRADO',
13595
+ 'ENCERRADA',
13596
+ 'CANCELED',
13597
+ 'CANCELLED',
13598
+ 'REJECTED',
13599
+ 'DENIED',
13600
+ 'OVERDUE',
13601
+ 'EXPIRED',
13602
+ 'ERROR',
13603
+ 'FAILED',
13604
+ 'BLOCKED',
13605
+ 'INACTIVE',
13606
+ 'CRITICAL',
13607
+ 'DISABLED',
13608
+ ]);
13609
+ const DOMAIN_SEMANTIC_PRIMARY_TOKENS = new Set([
13610
+ 'ABERTOS',
13611
+ 'NOVO',
13612
+ 'NOVOS',
13613
+ 'NOVA',
13614
+ 'PROCESSANDO',
13615
+ 'EM_PROCESSAMENTO',
13616
+ 'EXECUCAO',
13617
+ 'EM_EXECUCAO',
13618
+ 'INICIADO',
13619
+ 'INICIADA',
13620
+ 'OPEN',
13621
+ 'NEW',
13622
+ 'PROCESSING',
13623
+ 'RUNNING',
13624
+ 'STARTED',
13625
+ ]);
13626
+ function normalizeDomainSemanticLookupTokens(rawKey, rawLabel) {
13627
+ const combined = `${String(rawKey || '')} ${String(rawLabel || '')}`
13628
+ .normalize('NFD')
13629
+ .replace(/[\u0300-\u036f]/g, '')
13630
+ .toUpperCase()
13631
+ .replace(/[^A-Z0-9]+/g, '_')
13632
+ .replace(/^_+|_+$/g, '');
13633
+ const tokens = combined ? combined.split('_').filter(Boolean) : [];
13634
+ return { normalized: combined, tokens };
13635
+ }
13636
+ /**
13637
+ * Infere o tom visual semântico (`success` | `warning` | `danger` | `primary` | `default`)
13638
+ * para uma chave ou rótulo de domínio corporativo (ex.: status, situação, etapa de workflow).
13639
+ */
13640
+ function inferDomainSemanticTone(rawKey, rawLabel) {
13641
+ const { normalized, tokens } = normalizeDomainSemanticLookupTokens(rawKey, rawLabel);
13642
+ if (!normalized)
13643
+ return 'default';
13644
+ const matches = (set) => set.has(normalized) || tokens.some((token) => set.has(token));
13645
+ if (matches(DOMAIN_SEMANTIC_DANGER_TOKENS))
13646
+ return 'danger';
13647
+ if (matches(DOMAIN_SEMANTIC_WARNING_TOKENS))
13648
+ return 'warning';
13649
+ if (matches(DOMAIN_SEMANTIC_SUCCESS_TOKENS))
13650
+ return 'success';
13651
+ if (matches(DOMAIN_SEMANTIC_PRIMARY_TOKENS))
13652
+ return 'primary';
13653
+ return 'default';
13654
+ }
13655
+ /**
13656
+ * Infere um ícone Material semântico (`check_circle`, `schedule`, `cancel`, `sync`)
13657
+ * correspondente ao tom de uma chave ou rótulo de domínio corporativo.
13658
+ */
13659
+ function inferDomainSemanticIcon(rawKey, rawLabel) {
13660
+ const tone = inferDomainSemanticTone(rawKey, rawLabel);
13661
+ switch (tone) {
13662
+ case 'success':
13663
+ return 'check_circle';
13664
+ case 'warning':
13665
+ return 'schedule';
13666
+ case 'danger':
13667
+ return 'cancel';
13668
+ case 'primary':
13669
+ return 'sync';
13670
+ default:
13671
+ return undefined;
13672
+ }
13673
+ }
13674
+ /**
13675
+ * Mapeia o tom semântico de domínio (`inferDomainSemanticTone`) para uma cor hexadecimal
13676
+ * corporativa governada (compatível com paletas de gráficos e badges).
13677
+ */
13678
+ function inferDomainSemanticHexColor(rawKey, rawLabel, neutralFallback = '#64748b') {
13679
+ const tone = inferDomainSemanticTone(rawKey, rawLabel);
13680
+ switch (tone) {
13681
+ case 'success':
13682
+ return '#15803d';
13683
+ case 'warning':
13684
+ return '#ca8a04';
13685
+ case 'danger':
13686
+ return '#dc2626';
13687
+ case 'primary':
13688
+ return '#2563eb';
13689
+ default:
13690
+ return neutralFallback;
13691
+ }
13692
+ }
13693
+ function normalizeSemanticFieldIdentifier(name) {
13694
+ return String(name || '')
13695
+ .trim()
13696
+ .normalize('NFD')
13697
+ .replace(/[\u0300-\u036f]/g, '')
13698
+ .replace(/([a-z0-9])([A-Z])/g, '$1_$2')
13699
+ .toLowerCase()
13700
+ .replace(/[^a-z0-9]+/g, '_')
13701
+ .replace(/^_+|_+$/g, '');
13702
+ }
13703
+ function isSemanticPercentageField(tokens, formatLower) {
13704
+ if (formatLower === 'percent' || formatLower === 'percentage') {
13705
+ return true;
13706
+ }
13707
+ const hasToken = (...candidates) => candidates.some((c) => tokens.includes(c));
13708
+ if (hasToken('percentual', 'porcentagem', 'aliquota', 'percent', 'percentage', 'pct')) {
13709
+ return true;
13710
+ }
13711
+ if (hasToken('taxa', 'rate', 'margem', 'margin', 'juros', 'interest') &&
13712
+ !hasToken('valor', 'vl', 'vlr', 'amount', 'tipo', 'type', 'codigo', 'cod', 'code', 'id', 'data', 'date')) {
13713
+ return true;
13714
+ }
13715
+ return false;
13716
+ }
13717
+ function isSemanticPostalCodeField(normalizedName, tokens, formatLower) {
13718
+ if (formatLower === 'cep' || formatLower === 'postal-code' || formatLower === 'zip-code') {
13719
+ return true;
13720
+ }
13721
+ return (tokens.includes('cep') ||
13722
+ normalizedName === 'codigo_postal' ||
13723
+ normalizedName === 'postal_code' ||
13724
+ normalizedName === 'zip_code' ||
13725
+ normalizedName === 'zipcode');
13726
+ }
13727
+ /**
13728
+ * Infere o `FieldControlType` semântico recomendado para um campo a partir de seus metadados
13729
+ * (`type`, `dataType`, `format`, `options`, `enumValues`, `maxLength`) e da semântica bilíngue
13730
+ * (`pt-BR` / `en-US`) do identificador da propriedade.
13731
+ */
13732
+ function inferSemanticFieldControlType(field) {
13733
+ const rawControlType = String(field?.controlType ?? '').trim();
13734
+ const normalizedControlType = rawControlType
13735
+ ? resolveControlTypeAlias(rawControlType, FieldControlType.INPUT)
13736
+ : undefined;
13737
+ const isGenericInput = !normalizedControlType ||
13738
+ normalizedControlType === FieldControlType.INPUT ||
13739
+ normalizedControlType === FieldControlType.NUMERIC_TEXT_BOX;
13740
+ if (!isGenericInput && normalizedControlType) {
13741
+ return normalizedControlType;
13742
+ }
13743
+ const typeLower = String(field?.type ?? field?.dataType ?? '')
13744
+ .trim()
13745
+ .toLowerCase();
13746
+ const formatLower = String(field?.format ?? '')
13747
+ .trim()
13748
+ .toLowerCase();
13749
+ if (typeLower === 'boolean' || rawControlType.toLowerCase() === 'toggle') {
13750
+ return FieldControlType.TOGGLE;
13751
+ }
13752
+ const options = Array.isArray(field?.options) ? field.options : [];
13753
+ const enumValues = Array.isArray(field?.enumValues)
13754
+ ? field.enumValues
13755
+ : [];
13756
+ const hasDomainOptions = enumValues.length > 0 ||
13757
+ (options.length > 0 &&
13758
+ !options.every((opt) => opt?.value === true ||
13759
+ opt?.value === false ||
13760
+ opt?.value === 'true' ||
13761
+ opt?.value === 'false'));
13762
+ if (hasDomainOptions && (!normalizedControlType || normalizedControlType === FieldControlType.INPUT)) {
13763
+ return FieldControlType.SELECT;
13764
+ }
13765
+ const normalizedName = normalizeSemanticFieldIdentifier(String(field?.name ?? ''));
13766
+ const tokens = normalizedName ? normalizedName.split('_').filter(Boolean) : [];
13767
+ const hasToken = (...candidates) => candidates.some((c) => tokens.includes(c));
13768
+ const isNumericSchemaType = typeLower === 'number' ||
13769
+ typeLower === 'integer' ||
13770
+ typeLower === 'decimal' ||
13771
+ typeLower === 'float' ||
13772
+ typeLower === 'double' ||
13773
+ typeLower === 'bigdecimal' ||
13774
+ typeLower === 'long' ||
13775
+ typeLower === 'int' ||
13776
+ typeLower === 'short';
13777
+ const isIdOrCodeField = hasToken('id', 'uuid', 'codigo', 'cod', 'code', 'key', 'chave', 'seq', 'sequencial') &&
13778
+ !hasToken('cpf', 'cnpj', 'cep', 'telefone', 'celular', 'email');
13779
+ const isClassifierOrDescriptorField = hasToken('centro', 'center', 'tipo', 'type', 'categoria', 'category', 'natureza', 'status', 'situacao', 'nome', 'name', 'descricao', 'description', 'historico', 'motivo', 'justificativa', 'tabela', 'faixa', 'nivel', 'grade', 'classe', 'grupo', 'origem', 'destino', 'forma', 'metodo', 'condicao', 'moeda', 'simbolo') && !normalizedName.startsWith('valor_') && !normalizedName.startsWith('vl_') && !normalizedName.startsWith('vlr_');
13780
+ if (isSemanticPercentageField(tokens, formatLower) && !isIdOrCodeField) {
13781
+ return FieldControlType.NUMERIC_TEXT_BOX;
13782
+ }
13783
+ if (formatLower === 'currency' ||
13784
+ formatLower === 'money' ||
13785
+ typeLower === 'currency' ||
13786
+ (!isIdOrCodeField &&
13787
+ !isClassifierOrDescriptorField &&
13788
+ hasToken('valor', 'vl', 'vlr', 'salario', 'remuneracao', 'preco', 'custo', 'despesa', 'receita', 'saldo', 'montante', 'tarifa', 'subsidio', 'provento', 'orcamento', 'faturamento', 'amount', 'price', 'cost', 'salary', 'revenue', 'balance', 'fee', 'budget'))) {
13789
+ return FieldControlType.CURRENCY_INPUT;
13790
+ }
13791
+ if (isNumericSchemaType || normalizedControlType === FieldControlType.NUMERIC_TEXT_BOX) {
13792
+ return FieldControlType.NUMERIC_TEXT_BOX;
13793
+ }
13794
+ if (formatLower === 'cpf' ||
13795
+ formatLower === 'cnpj' ||
13796
+ formatLower === 'cpf-cnpj' ||
13797
+ formatLower === 'cpf_cnpj' ||
13798
+ hasToken('cpf', 'cnpj') ||
13799
+ normalizedName === 'documento_fiscal' ||
13800
+ normalizedName === 'inscricao_federal') {
13801
+ return FieldControlType.CPF_CNPJ_INPUT;
13802
+ }
13803
+ if (formatLower === 'email' ||
13804
+ hasToken('email') ||
13805
+ normalizedName.includes('e_mail') ||
13806
+ normalizedName.includes('correio_eletronico')) {
13807
+ return FieldControlType.EMAIL_INPUT;
13808
+ }
13809
+ if (formatLower === 'phone' ||
13810
+ formatLower === 'tel' ||
13811
+ hasToken('telefone', 'celular', 'whatsapp', 'ramal', 'phone', 'mobile', 'fone', 'tel')) {
13812
+ return FieldControlType.PHONE;
13813
+ }
13814
+ if (formatLower === 'url' ||
13815
+ formatLower === 'uri' ||
13816
+ hasToken('url', 'website', 'homepage', 'linkedin', 'github') ||
13817
+ normalizedName.endsWith('_url') ||
13818
+ normalizedName.endsWith('_link')) {
13819
+ return FieldControlType.URL_INPUT;
13820
+ }
13821
+ if (formatLower === 'color' ||
13822
+ formatLower === 'hex-color' ||
13823
+ normalizedName === 'cor_hex' ||
13824
+ normalizedName === 'hex_color' ||
13825
+ (hasToken('cor', 'color') &&
13826
+ hasToken('hex', 'primaria', 'secundaria', 'tema', 'fundo', 'texto', 'borda', 'icone', 'primary', 'secondary', 'theme', 'background', 'foreground', 'border', 'badge'))) {
13827
+ return FieldControlType.COLOR_PICKER;
13828
+ }
13829
+ if (formatLower === 'password' ||
13830
+ hasToken('password', 'senha') ||
13831
+ normalizedName === 'secret_key' ||
13832
+ normalizedName === 'token_acesso') {
13833
+ return FieldControlType.PASSWORD;
13834
+ }
13835
+ const isTemporalAuditSuffix = normalizedName.endsWith('_at') ||
13836
+ /^(criado|atualizado|excluido|deletado|publicado|expira|iniciado|finalizado|concluido|aprovado|rejeitado|cancelado|enviado|recebido|processado|assinado|realizado)_em$/.test(normalizedName);
13837
+ if (formatLower === 'date-time' ||
13838
+ formatLower === 'datetime' ||
13839
+ formatLower === 'instant' ||
13840
+ typeLower === 'datetime' ||
13841
+ hasToken('datetime', 'timestamp') ||
13842
+ normalizedName.startsWith('data_hora') ||
13843
+ isTemporalAuditSuffix) {
13844
+ return FieldControlType.DATETIME_LOCAL_INPUT;
13845
+ }
13846
+ const isDatePartOrDurationField = hasToken('dia', 'dias', 'mes', 'meses', 'ano', 'anos', 'prazo', 'idade', 'qtd', 'quantidade', 'numero', 'num', 'nr', 'day', 'days', 'month', 'months', 'year', 'years', 'age') && !hasToken('data', 'dt', 'date');
13847
+ if (formatLower === 'date' ||
13848
+ formatLower === 'local-date' ||
13849
+ typeLower === 'date' ||
13850
+ (!isDatePartOrDurationField &&
13851
+ hasToken('data', 'dt', 'date', 'birthdate', 'nascimento', 'admissao', 'demissao', 'vencimento', 'emissao', 'publicacao', 'vigencia', 'competencia'))) {
13852
+ return FieldControlType.DATE_PICKER;
13853
+ }
13854
+ const maxLength = typeof field?.maxLength === 'number'
13855
+ ? field.maxLength
13856
+ : typeof field?.validators?.maxLength === 'number'
13857
+ ? field.validators.maxLength
13858
+ : undefined;
13859
+ if ((typeof maxLength === 'number' && maxLength >= 250) ||
13860
+ hasToken('observacao', 'observacoes', 'descricao', 'detalhes', 'justificativa', 'motivo', 'parecer', 'historico', 'comentarios', 'comentario', 'notas', 'resumo', 'biografia', 'description', 'notes', 'comments', 'summary', 'details', 'remarks')) {
13861
+ return FieldControlType.TEXTAREA;
13862
+ }
13863
+ return normalizedControlType ?? FieldControlType.INPUT;
13864
+ }
13865
+ /**
13866
+ * Calibra um `FieldMetadata` a partir de pistas de schema e da semântica bilíngue (`pt-BR` / `en-US`)
13867
+ * do nome do campo, ajustando `controlType`, `label` humanizado, opções de domínio humanizadas e
13868
+ * defaults corporativos (`currency`, `locale`, `decimalPlaces`, `documentType`, `numericFormat`, `mask`).
13869
+ */
13870
+ function calibrateFieldMetadataFromSemantics(field) {
13871
+ if (!field || typeof field !== 'object') {
13872
+ return field;
13873
+ }
13874
+ const next = { ...field };
13875
+ const name = String(next.name ?? '').trim();
13876
+ // 1. Humanize technical label when missing or identical to field name / SCREAMING_SNAKE_CASE
13877
+ const currentLabel = String(next.label ?? '').trim();
13878
+ const isRawTechnicalLabel = !currentLabel ||
13879
+ currentLabel === name ||
13880
+ (/^[A-Z0-9_]+$/.test(currentLabel) && currentLabel.includes('_')) ||
13881
+ (/^[a-z0-9_]+$/.test(currentLabel) && currentLabel.includes('_'));
13882
+ if (name && isRawTechnicalLabel) {
13883
+ next.label = humanizeCatalogFieldName(name) || name;
13884
+ }
13885
+ // 2. Infer semantic controlType
13886
+ const inferredControlType = inferSemanticFieldControlType(next);
13887
+ if (inferredControlType) {
13888
+ next.controlType = inferredControlType;
13889
+ }
13890
+ // 3. Apply domain-specific defaults
13891
+ const normalizedName = normalizeSemanticFieldIdentifier(name);
13892
+ const tokens = normalizedName ? normalizedName.split('_').filter(Boolean) : [];
13893
+ const formatLower = String(next.format ?? '').trim().toLowerCase();
13894
+ if (next.controlType === FieldControlType.CPF_CNPJ_INPUT) {
13895
+ if (!next.documentType) {
13896
+ const hasCpf = tokens.includes('cpf');
13897
+ const hasCnpj = tokens.includes('cnpj');
13898
+ next.documentType =
13899
+ hasCpf && !hasCnpj ? 'cpf' : hasCnpj && !hasCpf ? 'cnpj' : 'both';
13900
+ }
13901
+ }
13902
+ else if (next.controlType === FieldControlType.CURRENCY_INPUT) {
13903
+ if (!next.currency) {
13904
+ next.currency = 'BRL';
13905
+ }
13906
+ if (!next.locale) {
13907
+ next.locale = next.currency === 'USD' ? 'en-US' : 'pt-BR';
13908
+ }
13909
+ if (next.decimalPlaces === undefined || next.decimalPlaces === null) {
13910
+ next.decimalPlaces = 2;
13911
+ }
13912
+ if (!next.currencyPosition) {
13913
+ next.currencyPosition = 'before';
13914
+ }
13915
+ }
13916
+ else if (next.controlType === FieldControlType.NUMERIC_TEXT_BOX &&
13917
+ isSemanticPercentageField(tokens, formatLower)) {
13918
+ if (!next.numericFormat) {
13919
+ next.numericFormat = 'percent';
13920
+ }
13921
+ if (next.decimalPlaces === undefined || next.decimalPlaces === null) {
13922
+ next.decimalPlaces = 2;
13923
+ }
13924
+ const currentNumberFormat = next.numberFormat && typeof next.numberFormat === 'object'
13925
+ ? next.numberFormat
13926
+ : {};
13927
+ if (currentNumberFormat.percentage !== true ||
13928
+ currentNumberFormat.decimalPlaces === undefined) {
13929
+ next.numberFormat = {
13930
+ ...currentNumberFormat,
13931
+ percentage: currentNumberFormat.percentage ?? true,
13932
+ decimalPlaces: currentNumberFormat.decimalPlaces ?? next.decimalPlaces ?? 2,
13933
+ };
13934
+ }
13935
+ }
13936
+ else if (next.controlType === FieldControlType.INPUT &&
13937
+ isSemanticPostalCodeField(normalizedName, tokens, formatLower)) {
13938
+ if (!next.mask) {
13939
+ next.mask = '00000-000';
13940
+ }
13941
+ if (!next.inputMode) {
13942
+ next.inputMode = 'numeric';
13943
+ }
13944
+ }
13945
+ // 4. Materialize and humanize domain options when enumValues or raw technical options exist
13946
+ const rawEnumValues = Array.isArray(next.enumValues)
13947
+ ? next.enumValues.filter((v) => typeof v === 'string' && v.trim().length > 0)
13948
+ : [];
13949
+ if (rawEnumValues.length > 0 && (!Array.isArray(next.options) || next.options.length === 0)) {
13950
+ next.options = rawEnumValues.map((val) => {
13951
+ const humanized = humanizeCatalogFieldName(val) || val;
13952
+ return {
13953
+ value: val,
13954
+ text: humanized,
13955
+ label: humanized,
13956
+ };
13957
+ });
13958
+ }
13959
+ else if (Array.isArray(next.options) && next.options.length > 0) {
13960
+ next.options = next.options.map((opt) => {
13961
+ if (!opt || typeof opt !== 'object')
13962
+ return opt;
13963
+ const valStr = String(opt.value ?? '').trim();
13964
+ const textStr = String(opt.text ?? opt.label ?? '').trim();
13965
+ if (valStr &&
13966
+ valStr !== 'true' &&
13967
+ valStr !== 'false' &&
13968
+ (!textStr || (textStr === valStr && /^[A-Z0-9_]+$/.test(textStr)))) {
13969
+ const humanized = humanizeCatalogFieldName(valStr) || valStr;
13970
+ return {
13971
+ ...opt,
13972
+ text: humanized,
13973
+ ...(opt.label !== undefined ? { label: humanized } : {}),
13974
+ };
13975
+ }
13976
+ return opt;
13977
+ });
13978
+ }
13979
+ return next;
13980
+ }
13981
+ /**
13982
+ * Verifica se a calibração semântica (`calibrateFieldMetadataFromSemantics`) produz
13983
+ * alguma melhoria material em relação aos metadados atuais do campo.
13984
+ */
13985
+ function hasSemanticFieldCalibrationDiff(field) {
13986
+ if (!field || typeof field !== 'object') {
13987
+ return false;
13988
+ }
13989
+ const name = String(field.name ?? '').trim();
13990
+ if (!name) {
13991
+ return false;
13992
+ }
13993
+ const calibrated = calibrateFieldMetadataFromSemantics(field);
13994
+ const source = field;
13995
+ const keysToCompare = [
13996
+ 'label',
13997
+ 'controlType',
13998
+ 'currency',
13999
+ 'locale',
14000
+ 'decimalPlaces',
14001
+ 'currencyPosition',
14002
+ 'documentType',
14003
+ 'numericFormat',
14004
+ 'mask',
14005
+ 'inputMode',
14006
+ ];
14007
+ for (const key of keysToCompare) {
14008
+ if (calibrated[key] !== source[key]) {
14009
+ return true;
14010
+ }
14011
+ }
14012
+ if (JSON.stringify(calibrated['numberFormat'] ?? null) !==
14013
+ JSON.stringify(source['numberFormat'] ?? null)) {
14014
+ return true;
14015
+ }
14016
+ if (JSON.stringify(calibrated['options'] ?? null) !==
14017
+ JSON.stringify(source['options'] ?? null)) {
14018
+ return true;
14019
+ }
14020
+ return false;
14021
+ }
13265
14022
 
13266
14023
  const DEFAULT_DYNAMIC_FORM_SCHEMA_CACHE_TTL_MS = 10 * 60 * 1000; // 10 minutes
13267
14024
  const DEFAULT_DYNAMIC_FORM_SCHEMA_CACHE_MAX_ENTRIES = 100;
@@ -15693,6 +16450,7 @@ const RESOURCE_DISCOVERY_I18N_CONFIG = {
15693
16450
  'quickConnect.hint.options': 'Escolha um recurso de opções/lookup publicado pela API.',
15694
16451
  'quickConnect.hint.crud': 'Escolha um recurso de cadastro/operação publicado pela API.',
15695
16452
  'quickConnect.readOnly': 'Somente leitura',
16453
+ 'quickConnect.changeResource': 'Trocar recurso',
15696
16454
  'quickConnect.searchPlaceholder': 'Buscar por nome, chave ou rota…',
15697
16455
  'quickConnect.fields': 'Carregar campos do filtro',
15698
16456
  'quickConnect.fieldsError': 'Não foi possível carregar os campos. Verifique o recurso e tente novamente.',
@@ -15730,6 +16488,7 @@ const RESOURCE_DISCOVERY_I18N_CONFIG = {
15730
16488
  'quickConnect.hint.options': 'Choose an options/lookup resource published by the API.',
15731
16489
  'quickConnect.hint.crud': 'Choose a CRUD/record resource published by the API.',
15732
16490
  'quickConnect.readOnly': 'Read-only',
16491
+ 'quickConnect.changeResource': 'Change resource',
15733
16492
  'quickConnect.searchPlaceholder': 'Search by name, key, or path…',
15734
16493
  'quickConnect.fields': 'Load filter fields',
15735
16494
  'quickConnect.fieldsError': 'Fields could not be loaded. Check the resource and retry.',
@@ -18077,7 +18836,7 @@ const SURFACE_OPEN_PRESETS = [
18077
18836
  * Invalid roles are omitted and a completely empty context resolves to `null`.
18078
18837
  */
18079
18838
  function normalizeSurfaceOperationContext(value) {
18080
- if (!isRecord$4(value))
18839
+ if (!isRecord$5(value))
18081
18840
  return null;
18082
18841
  const taskScope = normalizeResourceRef(value['taskScope']);
18083
18842
  const subject = normalizeResourceRef(value['subject']);
@@ -18091,7 +18850,7 @@ function normalizeSurfaceOperationContext(value) {
18091
18850
  };
18092
18851
  }
18093
18852
  function normalizeResourceRef(value) {
18094
- if (!isRecord$4(value))
18853
+ if (!isRecord$5(value))
18095
18854
  return undefined;
18096
18855
  const resourceKey = normalizeText(value['resourceKey']);
18097
18856
  const resourceId = normalizeResourceId(value['resourceId']);
@@ -18105,7 +18864,7 @@ function normalizeResourceRef(value) {
18105
18864
  };
18106
18865
  }
18107
18866
  function normalizeRelationship(value) {
18108
- if (!isRecord$4(value))
18867
+ if (!isRecord$5(value))
18109
18868
  return undefined;
18110
18869
  const surfaceId = normalizeText(value['surfaceId']);
18111
18870
  const childResourceKey = normalizeText(value['childResourceKey']);
@@ -18119,7 +18878,7 @@ function normalizeRelationship(value) {
18119
18878
  };
18120
18879
  }
18121
18880
  function normalizeIdentity(value) {
18122
- if (!isRecord$4(value) || !Array.isArray(value['metadata']))
18881
+ if (!isRecord$5(value) || !Array.isArray(value['metadata']))
18123
18882
  return undefined;
18124
18883
  const key = normalizeIdentityPart(value['key']);
18125
18884
  const title = normalizeIdentityPart(value['title']);
@@ -18142,7 +18901,7 @@ function normalizeIdentity(value) {
18142
18901
  };
18143
18902
  }
18144
18903
  function normalizeIdentityPart(value) {
18145
- if (!isRecord$4(value))
18904
+ if (!isRecord$5(value))
18146
18905
  return undefined;
18147
18906
  const field = normalizeText(value['field']);
18148
18907
  const partValue = normalizeDisplayValue(value['value']);
@@ -18165,11 +18924,11 @@ function normalizeDisplayValue(value) {
18165
18924
  return typeof value === 'boolean' ? value : undefined;
18166
18925
  }
18167
18926
  function cloneJsonRecord(value) {
18168
- if (!isRecord$4(value))
18927
+ if (!isRecord$5(value))
18169
18928
  return undefined;
18170
18929
  try {
18171
18930
  const cloned = JSON.parse(JSON.stringify(value));
18172
- return isRecord$4(cloned) ? cloned : undefined;
18931
+ return isRecord$5(cloned) ? cloned : undefined;
18173
18932
  }
18174
18933
  catch {
18175
18934
  return undefined;
@@ -18189,7 +18948,7 @@ function normalizeText(value) {
18189
18948
  const normalized = value.trim();
18190
18949
  return normalized || undefined;
18191
18950
  }
18192
- function isRecord$4(value) {
18951
+ function isRecord$5(value) {
18193
18952
  return !!value && typeof value === 'object' && !Array.isArray(value);
18194
18953
  }
18195
18954
 
@@ -19710,7 +20469,7 @@ const EXPERIENCE_HEADERS = new Set(['accept-language', 'x-timezone', 'x-praxis-m
19710
20469
  /** A response for an older selection must never be presented as confirmed. */
19711
20470
  class EnterpriseRuntimeContextObsoleteError extends Error {
19712
20471
  constructor() {
19713
- super('Runtime context changed before the switch was confirmed.');
20472
+ super('Runtime context changed before the operation was confirmed.');
19714
20473
  this.name = 'EnterpriseRuntimeContextObsoleteError';
19715
20474
  }
19716
20475
  }
@@ -19788,8 +20547,57 @@ class EnterpriseRuntimeContextService {
19788
20547
  headers: this.requestHeaders({ includeSnapshot: true }), params,
19789
20548
  }));
19790
20549
  }
19791
- navigation() {
19792
- return this.getRuntimeSurface('navigation');
20550
+ /** Read one authorized navigation page for the currently confirmed context. */
20551
+ async navigation(options = {}) {
20552
+ const { parentRef, cursor, pageSize = 50 } = options;
20553
+ if (!Number.isInteger(pageSize) || pageSize < 1 || pageSize > 100) {
20554
+ throw new RangeError('pageSize must be an integer between 1 and 100.');
20555
+ }
20556
+ if (parentRef !== undefined && !/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.test(parentRef)) {
20557
+ throw new RangeError('parentRef must be a canonical group UUID.');
20558
+ }
20559
+ if (cursor !== undefined && (typeof cursor !== 'string' || cursor.length === 0 || cursor.length > 4096)) {
20560
+ throw new RangeError('cursor must be a non-empty opaque string of at most 4096 characters.');
20561
+ }
20562
+ // Capture before ready(): a context load or switch may itself become obsolete.
20563
+ const revision = this.contextRevision;
20564
+ let expectedContextVersion = null;
20565
+ try {
20566
+ const context = await this.ready();
20567
+ if (revision !== this.contextRevision)
20568
+ throw new EnterpriseRuntimeContextObsoleteError();
20569
+ const contextVersion = context?.state === 'ready' ? context.effectiveContext?.contextVersion : null;
20570
+ if (!contextVersion?.trim())
20571
+ throw new Error('Runtime context is not confirmed.');
20572
+ expectedContextVersion = contextVersion;
20573
+ if (this.effectiveContext?.contextVersion !== contextVersion)
20574
+ throw new EnterpriseRuntimeContextObsoleteError();
20575
+ let params = new HttpParams().set('pageSize', pageSize);
20576
+ if (parentRef !== undefined)
20577
+ params = params.set('parentRef', parentRef);
20578
+ if (cursor !== undefined)
20579
+ params = params.set('cursor', cursor);
20580
+ const headers = this.requestHeaders({ includeSnapshot: true });
20581
+ if (revision !== this.contextRevision || this.effectiveContext?.contextVersion !== contextVersion) {
20582
+ throw new EnterpriseRuntimeContextObsoleteError();
20583
+ }
20584
+ const response = await firstValueFrom(this.http.get(this.endpoint('navigation'), {
20585
+ headers, params,
20586
+ }));
20587
+ if (revision !== this.contextRevision || this.effectiveContext?.contextVersion !== contextVersion) {
20588
+ throw new EnterpriseRuntimeContextObsoleteError();
20589
+ }
20590
+ if (response.contextVersion !== contextVersion) {
20591
+ throw new EnterpriseRuntimeContextObsoleteError();
20592
+ }
20593
+ return response;
20594
+ }
20595
+ catch (error) {
20596
+ if (revision !== this.contextRevision || (expectedContextVersion !== null && this.effectiveContext?.contextVersion !== expectedContextVersion)) {
20597
+ throw new EnterpriseRuntimeContextObsoleteError();
20598
+ }
20599
+ throw error;
20600
+ }
19793
20601
  }
19794
20602
  securityEvents() {
19795
20603
  return this.getRuntimeSurface('securityEvents');
@@ -23116,7 +23924,7 @@ function normalizeUnknownError(rawError) {
23116
23924
  if (typeof candidate === 'string') {
23117
23925
  return normalizeFromParts('Error', candidate);
23118
23926
  }
23119
- if (isRecord$3(candidate)) {
23927
+ if (isRecord$4(candidate)) {
23120
23928
  const name = toText(candidate['name'], 'Error');
23121
23929
  const message = toText(candidate['message'], safeStringify(candidate));
23122
23930
  const stack = toStack(candidate['stack']);
@@ -23135,7 +23943,7 @@ function extractErrorCandidate(data) {
23135
23943
  if (data instanceof Error || typeof data === 'string') {
23136
23944
  return data;
23137
23945
  }
23138
- if (!isRecord$3(data)) {
23946
+ if (!isRecord$4(data)) {
23139
23947
  return undefined;
23140
23948
  }
23141
23949
  if ('error' in data) {
@@ -23153,7 +23961,7 @@ function extractErrorCandidate(data) {
23153
23961
  return undefined;
23154
23962
  }
23155
23963
  function unwrapRejection(error) {
23156
- if (!isRecord$3(error)) {
23964
+ if (!isRecord$4(error)) {
23157
23965
  return error;
23158
23966
  }
23159
23967
  if ('rejection' in error) {
@@ -23213,7 +24021,7 @@ function safeStringify(value) {
23213
24021
  return UNKNOWN_ERROR_MESSAGE;
23214
24022
  }
23215
24023
  }
23216
- function isRecord$3(value) {
24024
+ function isRecord$4(value) {
23217
24025
  return !!value && typeof value === 'object';
23218
24026
  }
23219
24027
 
@@ -26189,7 +26997,7 @@ function normalizeReactiveDeterminations(value) {
26189
26997
  return normalized;
26190
26998
  }
26191
26999
  function normalizeReactiveDetermination(value) {
26192
- if (!isRecord$2(value) ||
27000
+ if (!isRecord$3(value) ||
26193
27001
  !hasOnlyKeys(value, ['id', 'trigger', 'scope', 'capability', 'inputs', 'outputs', 'provenance'])) {
26194
27002
  return null;
26195
27003
  }
@@ -26246,7 +27054,7 @@ function hasDependencyCycle(definitions) {
26246
27054
  return definitions.some((_definition, index) => visit(index));
26247
27055
  }
26248
27056
  function normalizeTrigger(value) {
26249
- if (!isRecord$2(value) || !hasOnlyKeys(value, ['mode', 'sourcePaths']))
27057
+ if (!isRecord$3(value) || !hasOnlyKeys(value, ['mode', 'sourcePaths']))
26250
27058
  return null;
26251
27059
  const sourcePaths = pointerArray(value['sourcePaths'], MAX_REACTIVE_DETERMINATION_BINDINGS);
26252
27060
  if (value['mode'] !== 'on-change' || !sourcePaths.length)
@@ -26254,7 +27062,7 @@ function normalizeTrigger(value) {
26254
27062
  return { mode: 'on-change', sourcePaths };
26255
27063
  }
26256
27064
  function normalizeScope(value) {
26257
- if (!isRecord$2(value) || !hasOnlyKeys(value, ['schemaOperationId', 'formMode']))
27065
+ if (!isRecord$3(value) || !hasOnlyKeys(value, ['schemaOperationId', 'formMode']))
26258
27066
  return null;
26259
27067
  const schemaOperationId = stableId(value['schemaOperationId']);
26260
27068
  const formMode = value['formMode'];
@@ -26263,7 +27071,7 @@ function normalizeScope(value) {
26263
27071
  return { schemaOperationId, formMode };
26264
27072
  }
26265
27073
  function normalizeCapability(value) {
26266
- if (!isRecord$2(value) ||
27074
+ if (!isRecord$3(value) ||
26267
27075
  !hasOnlyKeys(value, ['operationId', 'method', 'href', 'requestSchemaUrl', 'responseSchemaUrl'])) {
26268
27076
  return null;
26269
27077
  }
@@ -26288,7 +27096,7 @@ function normalizeInputs(value) {
26288
27096
  const fieldPaths = new Set();
26289
27097
  const requestPaths = new Set();
26290
27098
  for (const candidate of value) {
26291
- if (!isRecord$2(candidate) || !hasOnlyKeys(candidate, ['fieldPath', 'requestPath']))
27099
+ if (!isRecord$3(candidate) || !hasOnlyKeys(candidate, ['fieldPath', 'requestPath']))
26292
27100
  return [];
26293
27101
  const fieldPath = jsonPointer(candidate['fieldPath']);
26294
27102
  const requestPath = jsonPointer(candidate['requestPath']);
@@ -26310,7 +27118,7 @@ function normalizeOutputs(value) {
26310
27118
  const responsePaths = new Set();
26311
27119
  const fieldPaths = new Set();
26312
27120
  for (const candidate of value) {
26313
- if (!isRecord$2(candidate) || !hasOnlyKeys(candidate, ['responsePath', 'fieldPath']))
27121
+ if (!isRecord$3(candidate) || !hasOnlyKeys(candidate, ['responsePath', 'fieldPath']))
26314
27122
  return [];
26315
27123
  const responsePath = jsonPointer(candidate['responsePath']);
26316
27124
  const fieldPath = jsonPointer(candidate['fieldPath']);
@@ -26326,7 +27134,7 @@ function normalizeOutputs(value) {
26326
27134
  return result;
26327
27135
  }
26328
27136
  function normalizeProvenance(value) {
26329
- if (!isRecord$2(value) || !hasOnlyKeys(value, ['kind', 'source', 'version']))
27137
+ if (!isRecord$3(value) || !hasOnlyKeys(value, ['kind', 'source', 'version']))
26330
27138
  return null;
26331
27139
  const kind = value['kind'];
26332
27140
  const source = stableId(value['source']);
@@ -26385,7 +27193,7 @@ function isSafeRelativeOperationPath(path) {
26385
27193
  function nonBlank(value) {
26386
27194
  return typeof value === 'string' && value.trim() ? value.trim() : null;
26387
27195
  }
26388
- function isRecord$2(value) {
27196
+ function isRecord$3(value) {
26389
27197
  return !!value && typeof value === 'object' && !Array.isArray(value);
26390
27198
  }
26391
27199
  function hasOnlyKeys(value, allowed) {
@@ -29326,20 +30134,20 @@ function markerColorForEvent$1(eventType) {
29326
30134
 
29327
30135
  /** Narrows an unknown HTTP error body without relying on human-readable message parsing. */
29328
30136
  function isDomainRuleSnapshotProblemResponse(value) {
29329
- if (!isRecord$1(value) || typeof value['code'] !== 'string' || typeof value['message'] !== 'string') {
30137
+ if (!isRecord$2(value) || typeof value['code'] !== 'string' || typeof value['message'] !== 'string') {
29330
30138
  return false;
29331
30139
  }
29332
30140
  const blockers = value['blockers'];
29333
30141
  return Array.isArray(blockers) && blockers.every(isDomainRuleSnapshotBlocker);
29334
30142
  }
29335
30143
  function isDomainRuleSnapshotBlocker(value) {
29336
- return isRecord$1(value)
30144
+ return isRecord$2(value)
29337
30145
  && typeof value['code'] === 'string'
29338
30146
  && typeof value['stage'] === 'string'
29339
30147
  && (value['definitionId'] === null || typeof value['definitionId'] === 'string')
29340
30148
  && typeof value['message'] === 'string';
29341
30149
  }
29342
- function isRecord$1(value) {
30150
+ function isRecord$2(value) {
29343
30151
  return typeof value === 'object' && value !== null && !Array.isArray(value);
29344
30152
  }
29345
30153
 
@@ -30521,6 +31329,265 @@ function stableToken(value) {
30521
31329
  .replace(/[^a-z0-9]+/g, '-')
30522
31330
  .replace(/^-+|-+$/g, '');
30523
31331
  }
31332
+ const SEMANTIC_GROUP_ORDER = {
31333
+ 'Dados Gerais': 1000,
31334
+ 'Documentos e Contato': 2000,
31335
+ 'Valores e Financeiro': 3000,
31336
+ 'Datas e Vigência': 4000,
31337
+ 'Observações e Detalhes': 5000,
31338
+ };
31339
+ function tokenizeFieldIdentifierForLayout(name) {
31340
+ const normalized = String(name || '')
31341
+ .trim()
31342
+ .normalize('NFD')
31343
+ .replace(/[\u0300-\u036f]/g, '')
31344
+ .replace(/([a-z0-9])([A-Z])/g, '$1_$2')
31345
+ .toLowerCase()
31346
+ .replace(/[^a-z0-9]+/g, '_')
31347
+ .replace(/^_+|_+$/g, '');
31348
+ return normalized ? normalized.split('_').filter(Boolean) : [];
31349
+ }
31350
+ /**
31351
+ * Infere o grupo semântico corporativo (`Dados Gerais`, `Documentos e Contato`,
31352
+ * `Valores e Financeiro`, `Datas e Vigência`, `Observações e Detalhes`) para um campo,
31353
+ * preservando `field.group` quando já especificado pelo autor ou schema.
31354
+ */
31355
+ function inferSemanticFieldGroup(field) {
31356
+ const explicitGroup = String(field?.group ?? '').trim();
31357
+ if (explicitGroup && explicitGroup.toLowerCase() !== 'default') {
31358
+ return explicitGroup;
31359
+ }
31360
+ const calibrated = calibrateFieldMetadataFromSemantics((field || {}));
31361
+ const controlType = String(calibrated.controlType ?? '').trim();
31362
+ const rawType = String(calibrated?.type ?? calibrated.dataType ?? '')
31363
+ .trim()
31364
+ .toLowerCase();
31365
+ const tokens = tokenizeFieldIdentifierForLayout(String(calibrated.name ?? ''));
31366
+ const hasToken = (...candidates) => candidates.some((c) => tokens.includes(c));
31367
+ if (controlType === FieldControlType.TEXTAREA ||
31368
+ controlType === FieldControlType.RICH_TEXT_EDITOR ||
31369
+ controlType === FieldControlType.FILE_UPLOAD ||
31370
+ controlType === FieldControlType.FILE_SELECT ||
31371
+ controlType === FieldControlType.ARRAY_INPUT ||
31372
+ hasToken('observacao', 'observacoes', 'descricao', 'detalhes', 'justificativa', 'motivo', 'parecer', 'historico', 'comentarios', 'comentario', 'notas', 'resumo', 'anexo', 'arquivo', 'description', 'notes', 'comments', 'summary', 'details', 'remarks')) {
31373
+ return 'Observações e Detalhes';
31374
+ }
31375
+ const isExplicitTemporalControl = controlType === FieldControlType.DATE_PICKER ||
31376
+ controlType === FieldControlType.DATE_INPUT ||
31377
+ controlType === FieldControlType.DATE_RANGE ||
31378
+ controlType === FieldControlType.DATE_TIME_PICKER ||
31379
+ controlType === FieldControlType.DATETIME_LOCAL_INPUT ||
31380
+ controlType === FieldControlType.TIME_INPUT ||
31381
+ controlType === FieldControlType.TIME_PICKER ||
31382
+ controlType === FieldControlType.MONTH_INPUT ||
31383
+ controlType === FieldControlType.YEAR_INPUT;
31384
+ const isExplicitNumericOrMonetary = controlType === FieldControlType.CURRENCY_INPUT ||
31385
+ controlType === FieldControlType.PRICE_RANGE ||
31386
+ controlType === FieldControlType.NUMERIC_TEXT_BOX ||
31387
+ calibrated.numericFormat === 'percent' ||
31388
+ calibrated.numberFormat?.percentage === true ||
31389
+ rawType === 'number' ||
31390
+ rawType === 'integer';
31391
+ if (!isExplicitTemporalControl &&
31392
+ (controlType === FieldControlType.CURRENCY_INPUT ||
31393
+ controlType === FieldControlType.PRICE_RANGE ||
31394
+ calibrated.numericFormat === 'percent' ||
31395
+ calibrated.numberFormat?.percentage === true ||
31396
+ hasToken('valor', 'vl', 'vlr', 'salario', 'remuneracao', 'vencimentos', 'preco', 'custo', 'despesa', 'receita', 'saldo', 'montante', 'tarifa', 'subsidio', 'provento', 'orcamento', 'faturamento', 'aliquota', 'percentual', 'porcentagem', 'taxa', 'juros', 'desconto', 'multa', 'parcela', 'amount', 'price', 'cost', 'salary', 'revenue', 'balance', 'fee', 'budget', 'discount', 'tax') ||
31397
+ (isExplicitNumericOrMonetary && hasToken('vencimento')))) {
31398
+ return 'Valores e Financeiro';
31399
+ }
31400
+ if (isExplicitTemporalControl ||
31401
+ (!isExplicitNumericOrMonetary &&
31402
+ hasToken('data', 'dt', 'date', 'datetime', 'timestamp', 'birthdate', 'nascimento', 'admissao', 'demissao', 'vencimento', 'emissao', 'publicacao', 'vigencia', 'competencia', 'prazo', 'validade', 'expiracao'))) {
31403
+ return 'Datas e Vigência';
31404
+ }
31405
+ if (controlType === FieldControlType.CPF_CNPJ_INPUT ||
31406
+ controlType === FieldControlType.EMAIL_INPUT ||
31407
+ controlType === FieldControlType.PHONE ||
31408
+ controlType === FieldControlType.URL_INPUT ||
31409
+ calibrated.mask === '00000-000' ||
31410
+ hasToken('cpf', 'cnpj', 'rg', 'cnh', 'pis', 'pasep', 'passaporte', 'documento', 'inscricao', 'email', 'telefone', 'celular', 'whatsapp', 'ramal', 'phone', 'mobile', 'cep', 'endereco', 'logradouro', 'bairro', 'cidade', 'municipio', 'uf', 'estado', 'pais', 'complemento', 'url', 'website', 'address', 'city', 'state', 'country')) {
31411
+ return 'Documentos e Contato';
31412
+ }
31413
+ return 'Dados Gerais';
31414
+ }
31415
+ /**
31416
+ * Infere a largura responsiva recomendada (`'xs' | 'sm' | 'md' | 'lg' | 'full'`)
31417
+ * para um campo de acordo com a ergonomia do seu `controlType`.
31418
+ */
31419
+ function inferSemanticFieldWidth(field) {
31420
+ const rawWidth = field?.width;
31421
+ if (rawWidth === 'xs' ||
31422
+ rawWidth === 'sm' ||
31423
+ rawWidth === 'md' ||
31424
+ rawWidth === 'lg' ||
31425
+ rawWidth === 'full') {
31426
+ return rawWidth;
31427
+ }
31428
+ const calibrated = calibrateFieldMetadataFromSemantics((field || {}));
31429
+ const controlType = String(calibrated.controlType ?? '').trim();
31430
+ if (controlType === FieldControlType.TEXTAREA ||
31431
+ controlType === FieldControlType.RICH_TEXT_EDITOR ||
31432
+ controlType === FieldControlType.FILE_UPLOAD ||
31433
+ controlType === FieldControlType.FILE_SELECT ||
31434
+ controlType === FieldControlType.ARRAY_INPUT) {
31435
+ return 'full';
31436
+ }
31437
+ if (controlType === FieldControlType.TOGGLE ||
31438
+ controlType === FieldControlType.CHECKBOX) {
31439
+ return 'xs';
31440
+ }
31441
+ if (controlType === FieldControlType.DATE_PICKER ||
31442
+ controlType === FieldControlType.DATE_INPUT ||
31443
+ controlType === FieldControlType.DATETIME_LOCAL_INPUT ||
31444
+ controlType === FieldControlType.TIME_INPUT ||
31445
+ controlType === FieldControlType.TIME_PICKER ||
31446
+ controlType === FieldControlType.CPF_CNPJ_INPUT ||
31447
+ controlType === FieldControlType.PHONE ||
31448
+ controlType === FieldControlType.CURRENCY_INPUT ||
31449
+ controlType === FieldControlType.NUMERIC_TEXT_BOX ||
31450
+ controlType === FieldControlType.COLOR_PICKER ||
31451
+ calibrated.mask === '00000-000') {
31452
+ return 'sm';
31453
+ }
31454
+ return 'md';
31455
+ }
31456
+ /**
31457
+ * Organiza os campos de um `FormConfig` em seções semânticas corporativas e linhas/colunas
31458
+ * responsivas usando o pipeline canônico `materializeFormLayoutFromMetadata`.
31459
+ */
31460
+ function organizeFormLayoutBySemantics(config) {
31461
+ const sourceFields = Array.isArray(config?.fieldMetadata)
31462
+ ? config.fieldMetadata
31463
+ : [];
31464
+ if (!sourceFields.length) {
31465
+ return {
31466
+ sections: Array.isArray(config?.sections) ? config.sections : [],
31467
+ fieldMetadata: [],
31468
+ };
31469
+ }
31470
+ const sortedIndices = sourceFields
31471
+ .map((field, idx) => ({
31472
+ idx,
31473
+ order: typeof field?.order === 'number' && Number.isFinite(field.order) ? field.order : idx + 1,
31474
+ }))
31475
+ .sort((a, b) => a.order - b.order || a.idx - b.idx);
31476
+ const relativeRankByIndex = new Map();
31477
+ sortedIndices.forEach((entry, rankIdx) => {
31478
+ relativeRankByIndex.set(entry.idx, rankIdx + 1);
31479
+ });
31480
+ const enrichedFields = sourceFields.map((field, idx) => {
31481
+ const calibrated = calibrateFieldMetadataFromSemantics(field);
31482
+ const group = inferSemanticFieldGroup(calibrated);
31483
+ const width = inferSemanticFieldWidth(calibrated);
31484
+ const groupRank = SEMANTIC_GROUP_ORDER[group] ?? 1500;
31485
+ const relativeOrder = relativeRankByIndex.get(idx) ?? idx + 1;
31486
+ return {
31487
+ ...calibrated,
31488
+ group,
31489
+ width: calibrated.width ?? width,
31490
+ order: groupRank + relativeOrder,
31491
+ };
31492
+ });
31493
+ const materialized = materializeFormLayoutFromMetadata(enrichedFields, {
31494
+ policy: {
31495
+ source: 'authored',
31496
+ preset: 'groupedCommand',
31497
+ intent: 'command',
31498
+ },
31499
+ defaultSectionTitle: 'Dados Gerais',
31500
+ });
31501
+ const existingVisualBlocks = [];
31502
+ for (const section of config?.sections || []) {
31503
+ for (const row of section?.rows || []) {
31504
+ for (const col of row?.columns || []) {
31505
+ for (const item of col?.items || []) {
31506
+ if (item && item.kind !== 'field') {
31507
+ existingVisualBlocks.push(item);
31508
+ }
31509
+ }
31510
+ }
31511
+ }
31512
+ }
31513
+ const nextSections = [...materialized.sections];
31514
+ if (existingVisualBlocks.length > 0 && nextSections.length > 0) {
31515
+ const firstSection = nextSections[0];
31516
+ const visualBlockRow = {
31517
+ id: `${firstSection.id || 'section-1'}-row-visual`,
31518
+ columns: [
31519
+ {
31520
+ id: `${firstSection.id || 'section-1'}-col-visual`,
31521
+ fields: [],
31522
+ items: existingVisualBlocks,
31523
+ span: { xs: 12, md: 12 },
31524
+ },
31525
+ ],
31526
+ };
31527
+ nextSections[0] = {
31528
+ ...firstSection,
31529
+ rows: [visualBlockRow, ...(firstSection.rows || [])],
31530
+ };
31531
+ }
31532
+ return {
31533
+ sections: nextSections,
31534
+ fieldMetadata: enrichedFields,
31535
+ };
31536
+ }
31537
+ /**
31538
+ * Verifica se `organizeFormLayoutBySemantics` produziria uma organização de seções/colunas
31539
+ * mais estruturada do que o estado atual de `config` (ex.: campos pendentes fora do layout
31540
+ * ou todos os campos concentrados em uma única seção genérica quando há múltiplos grupos semânticos).
31541
+ */
31542
+ function canOrganizeFormLayoutBySemantics(config) {
31543
+ const fields = Array.isArray(config?.fieldMetadata) ? config.fieldMetadata : [];
31544
+ if (!fields.length) {
31545
+ return false;
31546
+ }
31547
+ const visibleFields = fields.filter((f) => !!f?.name && !isFormHidden(f));
31548
+ if (!visibleFields.length) {
31549
+ return false;
31550
+ }
31551
+ const currentSections = Array.isArray(config?.sections) ? config.sections : [];
31552
+ if (currentSections.length > 1) {
31553
+ return false;
31554
+ }
31555
+ const placedFieldNames = new Set();
31556
+ for (const section of currentSections) {
31557
+ for (const row of section?.rows || []) {
31558
+ for (const col of row?.columns || []) {
31559
+ for (const name of col?.fields || []) {
31560
+ if (name)
31561
+ placedFieldNames.add(name);
31562
+ }
31563
+ for (const item of col?.items || []) {
31564
+ if (item?.kind === 'field' && item.fieldName) {
31565
+ placedFieldNames.add(item.fieldName);
31566
+ }
31567
+ }
31568
+ }
31569
+ }
31570
+ }
31571
+ // Há campos elegíveis ainda não posicionados no layout (com <= 1 seção)
31572
+ if (visibleFields.some((f) => !placedFieldNames.has(f.name))) {
31573
+ return true;
31574
+ }
31575
+ // Há múltiplos grupos semânticos possíveis, mas o layout atual possui <= 1 seção
31576
+ const distinctGroups = new Set(visibleFields.map((f) => inferSemanticFieldGroup(f)));
31577
+ if (distinctGroups.size > 1 && currentSections.length <= 1) {
31578
+ return true;
31579
+ }
31580
+ // Ou existe apenas 1 seção sem título / título genérico enquanto o grupo semântico é específico
31581
+ if (currentSections.length === 1) {
31582
+ const currentTitle = String(currentSections[0]?.title ?? '').trim().toLowerCase();
31583
+ const targetGroup = Array.from(distinctGroups)[0] ?? 'Dados Gerais';
31584
+ if ((!currentTitle || currentTitle === 'default' || currentTitle === 'seção 1' || currentTitle === 'secao 1' || currentTitle === 'section 1') &&
31585
+ currentTitle !== targetGroup.toLowerCase()) {
31586
+ return true;
31587
+ }
31588
+ }
31589
+ return false;
31590
+ }
30524
31591
 
30525
31592
  function resolveSpan(span) {
30526
31593
  const xs = clamp(span?.xs ?? 12, 'xs');
@@ -31738,6 +32805,58 @@ class SafeExpressionEvaluator {
31738
32805
  }
31739
32806
  }
31740
32807
 
32808
+ const SEMANTIC_ICON_ALIASES = {
32809
+ users: 'groups',
32810
+ user: 'person',
32811
+ 'user-round': 'person',
32812
+ 'user-round-check': 'how_to_reg',
32813
+ 'user-check': 'how_to_reg',
32814
+ 'user-plus': 'person_add',
32815
+ package: 'inventory_2',
32816
+ 'package-check': 'fact_check',
32817
+ 'package-2': 'inventory_2',
32818
+ siren: 'emergency',
32819
+ 'file-signature': 'contract',
32820
+ 'file-text': 'description',
32821
+ 'shield-alert': 'gpp_maybe',
32822
+ 'shield-check': 'verified_user',
32823
+ 'chart-no-axes-combined': 'monitoring',
32824
+ 'bar-chart': 'bar_chart',
32825
+ 'bar-chart-2': 'bar_chart',
32826
+ 'bar-chart-3': 'bar_chart',
32827
+ 'line-chart': 'show_chart',
32828
+ 'pie-chart': 'pie_chart',
32829
+ 'alert-triangle': 'warning',
32830
+ 'alert-circle': 'error',
32831
+ 'check-circle': 'check_circle',
32832
+ 'check-circle-2': 'check_circle',
32833
+ 'x-circle': 'cancel',
32834
+ trash: 'delete',
32835
+ 'trash-2': 'delete',
32836
+ 'edit-2': 'edit',
32837
+ 'edit-3': 'edit',
32838
+ plus: 'add',
32839
+ building: 'business',
32840
+ 'building-2': 'domain',
32841
+ truck: 'local_shipping',
32842
+ briefcase: 'work',
32843
+ 'dollar-sign': 'attach_money',
32844
+ 'credit-card': 'credit_card',
32845
+ calendar: 'calendar_today',
32846
+ clock: 'schedule',
32847
+ 'map-pin': 'location_on',
32848
+ activity: 'monitoring',
32849
+ };
32850
+ function normalizePraxisIconLigature(rawName) {
32851
+ const trimmed = (rawName || '').trim();
32852
+ if (!trimmed)
32853
+ return '';
32854
+ const lower = trimmed.toLowerCase();
32855
+ const mapped = SEMANTIC_ICON_ALIASES[lower] ?? SEMANTIC_ICON_ALIASES[lower.replace(/_/g, '-')];
32856
+ if (mapped)
32857
+ return mapped;
32858
+ return trimmed.replace(/-/g, '_');
32859
+ }
31741
32860
  /**
31742
32861
  * Binds a stored icon string to a mat-icon element supporting:
31743
32862
  * - Material Icons (classic ligatures): "mi:pending"
@@ -31791,7 +32910,7 @@ class PraxisIconDirective {
31791
32910
  this.rd.addClass(host, 'material-symbols-outlined');
31792
32911
  break;
31793
32912
  }
31794
- host.textContent = name;
32913
+ host.textContent = normalizePraxisIconLigature(name);
31795
32914
  }
31796
32915
  parse(raw) {
31797
32916
  const colon = raw.indexOf(':');
@@ -39049,8 +40168,8 @@ class DynamicWidgetLoaderDirective {
39049
40168
  ],
39050
40169
  'praxis-tabs': ['tabsId', 'componentInstanceId', 'configPersistenceStrategy', 'config'],
39051
40170
  'praxis-list': ['listId', 'componentInstanceId', 'enableCustomization', 'config'],
39052
- 'praxis-expansion': ['expansionId', 'componentInstanceId', 'config'],
39053
- 'praxis-stepper': ['stepperId', 'componentInstanceId', 'config'],
40171
+ 'praxis-expansion': ['expansionId', 'componentInstanceId', 'enableCustomization', 'config'],
40172
+ 'praxis-stepper': ['stepperId', 'componentInstanceId', 'enableCustomization', 'config'],
39054
40173
  'praxis-files-upload': ['filesUploadId', 'componentInstanceId', 'config'],
39055
40174
  };
39056
40175
  const baseOrder = bindingOrder && bindingOrder.length
@@ -39199,7 +40318,7 @@ class DynamicWidgetLoaderDirective {
39199
40318
  const allowedInputs = new Set((meta?.inputs || []).map((input) => input.name));
39200
40319
  const accepts = (key) => !allowedInputs.size || allowedInputs.has(key);
39201
40320
  if (id === 'praxis-rich-content' && inputs['kpis'] !== undefined && accepts('document')) {
39202
- const document = isRecord(inputs['document']) ? inputs['document'] : {};
40321
+ const document = isRecord$1(inputs['document']) ? inputs['document'] : {};
39203
40322
  inputs['document'] = {
39204
40323
  ...document,
39205
40324
  kpis: document['kpis'] ?? inputs['kpis'],
@@ -39486,7 +40605,7 @@ class DynamicWidgetLoaderDirective {
39486
40605
  if (Array.isArray(value)) {
39487
40606
  return value.map((entry) => this.stableSerializableValue(entry));
39488
40607
  }
39489
- if (isRecord(value)) {
40608
+ if (isRecord$1(value)) {
39490
40609
  return Object.keys(value)
39491
40610
  .sort()
39492
40611
  .reduce((acc, key) => {
@@ -39536,7 +40655,7 @@ function isWidgetEventEnvelope(value) {
39536
40655
  function isSubscribableOutput(value) {
39537
40656
  return !!value && typeof value.subscribe === 'function';
39538
40657
  }
39539
- function isRecord(value) {
40658
+ function isRecord$1(value) {
39540
40659
  return !!value && typeof value === 'object' && !Array.isArray(value);
39541
40660
  }
39542
40661
  function isSubscribableInput(value) {
@@ -59631,6 +60750,7 @@ class ResourceQuickConnectComponent {
59631
60750
  hint;
59632
60751
  disabled = false;
59633
60752
  selector;
60753
+ hostRef = this.optionalInject((ElementRef));
59634
60754
  registry = this.optionalInject(ComponentMetadataRegistry);
59635
60755
  discovery = this.optionalInject(ResourceDiscoveryService);
59636
60756
  i18n = this.optionalInject(PraxisI18nService);
@@ -59644,6 +60764,7 @@ class ResourceQuickConnectComponent {
59644
60764
  fallbackSearchTerm = '';
59645
60765
  catalogLoading = false;
59646
60766
  catalogError = false;
60767
+ lookupPickerOpen = false;
59647
60768
  isDirty$ = new BehaviorSubject(false);
59648
60769
  isValid$ = new BehaviorSubject(false);
59649
60770
  isBusy$ = new BehaviorSubject(false);
@@ -59740,6 +60861,8 @@ class ResourceQuickConnectComponent {
59740
60861
  }
59741
60862
  const nextValue = typeof value === 'string' ? value : '';
59742
60863
  this.manualInputActive = false;
60864
+ this.userForcedAdvancedOpen = false;
60865
+ this.lookupPickerOpen = false;
59743
60866
  this.resourcePath = nextValue;
59744
60867
  this.updateState(true);
59745
60868
  });
@@ -59747,6 +60870,22 @@ class ResourceQuickConnectComponent {
59747
60870
  this.handleBlur();
59748
60871
  });
59749
60872
  }
60873
+ openResourceLookupPicker(event) {
60874
+ event?.stopPropagation();
60875
+ if (this.disabled) {
60876
+ return;
60877
+ }
60878
+ this.lookupPickerOpen = !this.lookupPickerOpen;
60879
+ if (this.lookupPickerOpen) {
60880
+ this.fallbackSearchTerm = '';
60881
+ }
60882
+ this.cdr?.detectChanges();
60883
+ if (this.lookupPickerOpen) {
60884
+ const hostEl = this.hostRef?.nativeElement;
60885
+ const searchInput = hostEl?.querySelector('[data-testid="quick-connect-search-input"]');
60886
+ searchInput?.focus();
60887
+ }
60888
+ }
59750
60889
  async loadCatalog() {
59751
60890
  if (Array.isArray(this.resources)) {
59752
60891
  this.applyExplicitResources(this.resources);
@@ -59818,6 +60957,8 @@ class ResourceQuickConnectComponent {
59818
60957
  return;
59819
60958
  }
59820
60959
  this.manualInputActive = false;
60960
+ this.userForcedAdvancedOpen = false;
60961
+ this.lookupPickerOpen = false;
59821
60962
  this.resourcePath = option.value;
59822
60963
  this.updateState(true);
59823
60964
  this.syncSelectorValue();
@@ -59896,6 +61037,18 @@ class ResourceQuickConnectComponent {
59896
61037
  this.updateState(true);
59897
61038
  this.syncSelectorValue();
59898
61039
  }
61040
+ onAdvancedSummaryClick(event) {
61041
+ event.preventDefault();
61042
+ const currentlyOpen = this.shouldOpenAdvanced();
61043
+ if (currentlyOpen) {
61044
+ this.userForcedAdvancedOpen = false;
61045
+ this.manualInputActive = false;
61046
+ }
61047
+ else {
61048
+ this.userForcedAdvancedOpen = true;
61049
+ }
61050
+ this.cdr?.markForCheck();
61051
+ }
59899
61052
  onAdvancedToggle(event) {
59900
61053
  const details = event.target;
59901
61054
  if (details) {
@@ -59906,13 +61059,19 @@ class ResourceQuickConnectComponent {
59906
61059
  this.cvaOnTouched();
59907
61060
  }
59908
61061
  shouldOpenAdvanced() {
59909
- if ((!this.selectorType && !this.discoveredResources.length) ||
59910
- this.catalogError ||
59911
- this.manualInputActive ||
59912
- this.userForcedAdvancedOpen) {
61062
+ if (this.userForcedAdvancedOpen) {
61063
+ return true;
61064
+ }
61065
+ if (this.catalogError || this.manualInputActive) {
61066
+ return true;
61067
+ }
61068
+ if (this.catalogLoading) {
61069
+ return false;
61070
+ }
61071
+ if (!this.selectorType && !this.discoveredResources.length) {
59913
61072
  return true;
59914
61073
  }
59915
- if (!this.catalogLoading && !this.selectorInputs && !this.discoveredResources.length) {
61074
+ if (!this.selectorInputs && !this.discoveredResources.length) {
59916
61075
  return true;
59917
61076
  }
59918
61077
  const trimmed = this.resourcePath?.trim() || '';
@@ -59937,6 +61096,8 @@ class ResourceQuickConnectComponent {
59937
61096
  }
59938
61097
  reset() {
59939
61098
  this.manualInputActive = false;
61099
+ this.userForcedAdvancedOpen = false;
61100
+ this.lookupPickerOpen = false;
59940
61101
  this.resourcePath = this.baselineResourcePath;
59941
61102
  this.isDirty$.next(false);
59942
61103
  this.updateValidity();
@@ -59983,6 +61144,8 @@ class ResourceQuickConnectComponent {
59983
61144
  return trimmed;
59984
61145
  if (trimmed.startsWith('http://') || trimmed.startsWith('https://'))
59985
61146
  return trimmed;
61147
+ if (!trimmed.includes('/') && trimmed.includes('.'))
61148
+ return trimmed;
59986
61149
  return `/${trimmed}`;
59987
61150
  }
59988
61151
  resolvedSelectorValue() {
@@ -60197,12 +61360,67 @@ class ResourceQuickConnectComponent {
60197
61360
  </button>
60198
61361
  </div>
60199
61362
  }
61363
+ @if (selectedResource(); as selected) {
61364
+ <div
61365
+ class="pdx-quick-connect__selected-card"
61366
+ data-testid="quick-connect-selected-card"
61367
+ [class.is-clickable]="!disabled"
61368
+ (click)="openResourceLookupPicker($event)"
61369
+ >
61370
+ <span class="pdx-quick-connect__selected-icon" aria-hidden="true">
61371
+ <mat-icon [praxisIcon]="selected.icon || 'api'"></mat-icon>
61372
+ </span>
61373
+ <div class="pdx-quick-connect__selected-content">
61374
+ <span class="pdx-quick-connect__selected-overline">{{ label || tx('resource') }}</span>
61375
+ <div class="pdx-quick-connect__selected-header">
61376
+ <strong class="pdx-quick-connect__selected-title">{{ selected.label }}</strong>
61377
+ @if (selected.group) {
61378
+ <span class="pdx-quick-connect__option-badge">{{ selected.group }}</span>
61379
+ }
61380
+ @if (selected.readOnly) {
61381
+ <span class="pdx-quick-connect__option-badge pdx-quick-connect__option-badge--readonly">
61382
+ {{ tx('readOnly', 'Somente leitura') }}
61383
+ </span>
61384
+ }
61385
+ </div>
61386
+ <div class="pdx-quick-connect__selected-paths">
61387
+ <code class="pdx-quick-connect__selected-path">{{ selected.value }}</code>
61388
+ @if (selected.resourceKey && selected.resourceKey !== selected.value && selected.resourceKey !== selected.label) {
61389
+ <span class="pdx-quick-connect__selected-key">{{ selected.resourceKey }}</span>
61390
+ }
61391
+ </div>
61392
+ @if (selected.description) {
61393
+ <p class="pdx-quick-connect__selected-description">{{ selected.description }}</p>
61394
+ }
61395
+ </div>
61396
+ <div class="pdx-quick-connect__selected-actions">
61397
+ <button
61398
+ type="button"
61399
+ class="pdx-quick-connect__change-btn"
61400
+ data-testid="quick-connect-change-resource-btn"
61401
+ [attr.aria-expanded]="lookupPickerOpen"
61402
+ [disabled]="disabled"
61403
+ (click)="openResourceLookupPicker($event)"
61404
+ >
61405
+ <mat-icon [praxisIcon]="lookupPickerOpen ? 'expand_less' : 'manage_search'"></mat-icon>
61406
+ <span>{{ tx('changeResource', 'Trocar recurso') }}</span>
61407
+ </button>
61408
+ </div>
61409
+ </div>
61410
+ }
60200
61411
  @if (selectorType && selectorInputs) {
60201
- <div class="pdx-quick-connect__selector">
61412
+ <div
61413
+ class="pdx-quick-connect__selector"
61414
+ [class.is-collapsed-by-card]="!!selectedResource() || lookupPickerOpen"
61415
+ >
60202
61416
  <ng-container *ngComponentOutlet="selectorType" />
60203
61417
  </div>
60204
- } @else if (!selectorType && discoveredResources.length) {
60205
- <div class="pdx-quick-connect__Fallback pdx-quick-connect__fallback pdx-quick-connect__selector" data-testid="quick-connect-rich-fallback">
61418
+ }
61419
+ @if ((lookupPickerOpen || !selectorType) && discoveredResources.length) {
61420
+ <div
61421
+ class="pdx-quick-connect__Fallback pdx-quick-connect__fallback pdx-quick-connect__selector"
61422
+ data-testid="quick-connect-rich-fallback"
61423
+ >
60206
61424
  <mat-form-field appearance="outline" class="pdx-quick-connect__search-field" subscriptSizing="dynamic">
60207
61425
  <mat-label>{{ label || tx('resource') }}</mat-label>
60208
61426
  <mat-icon matPrefix [praxisIcon]="'search'"></mat-icon>
@@ -60212,6 +61430,7 @@ class ResourceQuickConnectComponent {
60212
61430
  [disabled]="disabled"
60213
61431
  [placeholder]="tx('searchPlaceholder')"
60214
61432
  [(ngModel)]="fallbackSearchTerm"
61433
+ (keydown.escape)="lookupPickerOpen = false"
60215
61434
  data-testid="quick-connect-search-input"
60216
61435
  />
60217
61436
  </mat-form-field>
@@ -60259,42 +61478,17 @@ class ResourceQuickConnectComponent {
60259
61478
  @if (!catalogLoading && !catalogError && !selectorInputs && !discoveredResources.length) {
60260
61479
  <p class="pdx-quick-connect__status" role="status">{{ tx('empty') }}</p>
60261
61480
  }
60262
- @if (selectedResource(); as selected) {
60263
- <div class="pdx-quick-connect__selected-card" data-testid="quick-connect-selected-card">
60264
- <span class="pdx-quick-connect__selected-icon" aria-hidden="true">
60265
- <mat-icon [praxisIcon]="selected.icon || 'api'"></mat-icon>
60266
- </span>
60267
- <div class="pdx-quick-connect__selected-content">
60268
- <div class="pdx-quick-connect__selected-header">
60269
- <strong class="pdx-quick-connect__selected-title">{{ selected.label }}</strong>
60270
- @if (selected.group) {
60271
- <span class="pdx-quick-connect__option-badge">{{ selected.group }}</span>
60272
- }
60273
- @if (selected.readOnly) {
60274
- <span class="pdx-quick-connect__option-badge pdx-quick-connect__option-badge--readonly">
60275
- {{ tx('readOnly', 'Somente leitura') }}
60276
- </span>
60277
- }
60278
- </div>
60279
- <div class="pdx-quick-connect__selected-paths">
60280
- <code class="pdx-quick-connect__selected-path">{{ selected.value }}</code>
60281
- @if (selected.resourceKey && selected.resourceKey !== selected.value && selected.resourceKey !== selected.label) {
60282
- <span class="pdx-quick-connect__selected-key">{{ selected.resourceKey }}</span>
60283
- }
60284
- </div>
60285
- @if (selected.description) {
60286
- <p class="pdx-quick-connect__selected-description">{{ selected.description }}</p>
60287
- }
60288
- </div>
60289
- </div>
61481
+ @if (!selectedResource() || !!hint?.trim()) {
61482
+ <small class="pdx-quick-connect__hint">{{ resolvedHint() }}</small>
60290
61483
  }
60291
- <small class="pdx-quick-connect__hint">{{ resolvedHint() }}</small>
61484
+ <div class="pdx-quick-connect__projected">
61485
+ <ng-content />
61486
+ </div>
60292
61487
  <details
60293
61488
  class="pdx-quick-connect__advanced"
60294
61489
  [open]="shouldOpenAdvanced()"
60295
- (toggle)="onAdvancedToggle($event)"
60296
61490
  >
60297
- <summary>{{ tx('advanced') }}</summary>
61491
+ <summary (click)="onAdvancedSummaryClick($event)">{{ tx('advanced') }}</summary>
60298
61492
  <mat-form-field appearance="outline" class="pdx-quick-connect__path-field">
60299
61493
  <mat-label>{{ tx('path') }}</mat-label>
60300
61494
  <input
@@ -60323,7 +61517,7 @@ class ResourceQuickConnectComponent {
60323
61517
  }
60324
61518
  </details>
60325
61519
  </div>
60326
- `, isInline: true, styles: [":host{display:block;container-type:inline-size;min-width:0}.pdx-quick-connect{display:grid;gap:10px;min-width:0;padding:12px;border-radius:12px;border:1px solid var(--md-sys-color-outline-variant, rgba(148, 163, 184, .28));background:var(--md-sys-color-surface, transparent);color:var(--md-sys-color-on-surface, inherit)}:host-context(.editor-card) .pdx-quick-connect,:host-context(.action-group) .pdx-quick-connect{padding:0;border:0;border-radius:0;background:transparent}.pdx-quick-connect__selector{min-width:0}@container (min-width: 560px){.pdx-quick-connect:has(>.pdx-quick-connect__selector):has(>.pdx-quick-connect__selected-card){grid-template-columns:minmax(260px,1fr) minmax(260px,1.2fr);align-items:start;column-gap:14px}.pdx-quick-connect:has(>.pdx-quick-connect__selector):has(>.pdx-quick-connect__selected-card)>.pdx-quick-connect__status,.pdx-quick-connect:has(>.pdx-quick-connect__selector):has(>.pdx-quick-connect__selected-card)>.pdx-quick-connect__error-row,.pdx-quick-connect:has(>.pdx-quick-connect__selector):has(>.pdx-quick-connect__selected-card)>.pdx-quick-connect__hint,.pdx-quick-connect:has(>.pdx-quick-connect__selector):has(>.pdx-quick-connect__selected-card)>.pdx-quick-connect__advanced{grid-column:1 / -1}}.pdx-quick-connect.is-disabled{opacity:.68}.pdx-quick-connect__status{margin:0;font-size:.85rem;color:var(--md-sys-color-on-surface-variant, inherit)}.pdx-quick-connect__error-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.pdx-quick-connect__retry{appearance:none;border:1px solid var(--md-sys-color-outline, rgba(148, 163, 184, .45));background:transparent;color:var(--md-sys-color-primary, inherit);border-radius:8px;padding:4px 10px;font-size:.8rem;font-weight:600;cursor:pointer}.pdx-quick-connect__fallback{display:grid;gap:8px}.pdx-quick-connect__search-field{width:100%}.pdx-quick-connect__option-list{display:flex;flex-direction:column;gap:4px;max-height:240px;overflow-y:auto;padding:4px;border-radius:10px;border:1px solid var(--md-sys-color-outline-variant, rgba(148, 163, 184, .24));background:var(--md-sys-color-surface-container-low, rgba(148, 163, 184, .04))}.pdx-quick-connect__option-item{display:flex;align-items:flex-start;gap:10px;width:100%;padding:8px 10px;border:1px solid transparent;border-radius:8px;background:transparent;color:inherit;font:inherit;text-align:start;cursor:pointer;transition:background .12s ease,border-color .12s ease}.pdx-quick-connect__option-item:hover:not(:disabled),.pdx-quick-connect__option-item.is-selected{background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 10%,transparent);border-color:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 24%,transparent)}.pdx-quick-connect__option-icon,.pdx-quick-connect__selected-icon{width:28px;height:28px;border-radius:8px;background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 12%,transparent);color:var(--md-sys-color-primary, inherit);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:1px}.pdx-quick-connect__option-icon mat-icon,.pdx-quick-connect__selected-icon mat-icon{width:16px;height:16px;font-size:16px}.pdx-quick-connect__option-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1 1 auto}.pdx-quick-connect__option-header,.pdx-quick-connect__selected-header{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}.pdx-quick-connect__option-label,.pdx-quick-connect__selected-title{font-size:.86rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdx-quick-connect__option-badge{display:inline-flex;align-items:center;padding:1px 6px;border-radius:999px;font-size:.68rem;font-weight:600;background:color-mix(in srgb,currentColor 10%,transparent);color:color-mix(in srgb,currentColor 78%,transparent);white-space:nowrap}.pdx-quick-connect__option-code,.pdx-quick-connect__selected-path{font-family:var(--pdx-font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);font-size:.72rem;color:var(--md-sys-color-primary, inherit);overflow-wrap:anywhere}.pdx-quick-connect__option-code{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdx-quick-connect__option-description,.pdx-quick-connect__selected-description{margin:0;font-size:.75rem;line-height:1.3;color:var(--md-sys-color-on-surface-variant, inherit)}.pdx-quick-connect__option-check{width:18px;height:18px;font-size:18px;color:var(--md-sys-color-primary, inherit);flex-shrink:0}.pdx-quick-connect__selected-card{display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border-radius:10px;background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 6%,transparent);border:1px solid color-mix(in srgb,var(--md-sys-color-primary, currentColor) 18%,transparent)}.pdx-quick-connect__selected-content{display:grid;gap:2px;min-width:0;flex:1 1 auto}.pdx-quick-connect__selected-paths{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}.pdx-quick-connect__selected-key{font-size:.7rem;color:var(--md-sys-color-on-surface-variant, inherit)}.pdx-quick-connect__hint{color:var(--md-sys-color-on-surface-variant, inherit);font-size:.82rem;line-height:1.35}.pdx-quick-connect__advanced{font-size:.85rem}.pdx-quick-connect__advanced>summary{cursor:pointer;-webkit-user-select:none;user-select:none;color:var(--md-sys-color-on-surface-variant, inherit);font-weight:500;margin-bottom:8px}.pdx-quick-connect__path-field{width:100%}\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
61520
+ `, isInline: true, styles: [":host{display:block;container-type:inline-size;min-width:0}.pdx-quick-connect{display:grid;gap:10px;min-width:0;padding:12px;border-radius:12px;border:1px solid var(--md-sys-color-outline-variant, rgba(148, 163, 184, .28));background:var(--md-sys-color-surface, transparent);color:var(--md-sys-color-on-surface, inherit)}:host-context(.editor-card) .pdx-quick-connect,:host-context(.action-group) .pdx-quick-connect{padding:0;border:0;border-radius:0;background:transparent}.pdx-quick-connect__selector{min-width:0;width:100%}.pdx-quick-connect__selector.is-collapsed-by-card{height:0;min-height:0;overflow:hidden;opacity:0;pointer-events:none;margin-top:-10px}.pdx-quick-connect__projected{display:contents}.pdx-quick-connect.is-disabled{opacity:.68}.pdx-quick-connect__status{margin:0;font-size:.85rem;color:var(--md-sys-color-on-surface-variant, inherit)}.pdx-quick-connect__error-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.pdx-quick-connect__retry{appearance:none;border:1px solid var(--md-sys-color-outline, rgba(148, 163, 184, .45));background:transparent;color:var(--md-sys-color-primary, inherit);border-radius:8px;padding:4px 10px;font-size:.8rem;font-weight:600;cursor:pointer}.pdx-quick-connect__fallback{display:grid;gap:8px}.pdx-quick-connect__search-field{width:100%}.pdx-quick-connect__option-list{display:flex;flex-direction:column;gap:4px;max-height:240px;overflow-y:auto;padding:4px;border-radius:10px;border:1px solid var(--md-sys-color-outline-variant, rgba(148, 163, 184, .24));background:var(--md-sys-color-surface-container-low, rgba(148, 163, 184, .04))}.pdx-quick-connect__option-item{display:flex;align-items:flex-start;gap:10px;width:100%;padding:8px 10px;border:1px solid transparent;border-radius:8px;background:transparent;color:inherit;font:inherit;text-align:start;cursor:pointer;transition:background .12s ease,border-color .12s ease}.pdx-quick-connect__option-item:hover:not(:disabled),.pdx-quick-connect__option-item.is-selected{background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 10%,transparent);border-color:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 24%,transparent)}.pdx-quick-connect__option-icon{width:28px;height:28px;border-radius:8px;background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 12%,transparent);color:var(--md-sys-color-primary, inherit);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:1px}.pdx-quick-connect__option-icon mat-icon{width:16px;height:16px;font-size:16px}.pdx-quick-connect__selected-icon{width:40px;height:40px;border-radius:10px;background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 14%,transparent);border:1px solid color-mix(in srgb,var(--md-sys-color-primary, currentColor) 26%,transparent);color:var(--md-sys-color-primary, inherit);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:2px}.pdx-quick-connect__selected-icon mat-icon{width:20px;height:20px;font-size:20px}.pdx-quick-connect__option-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1 1 auto}.pdx-quick-connect__option-header,.pdx-quick-connect__selected-header{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}.pdx-quick-connect__option-label{font-size:.86rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdx-quick-connect__selected-title{font-size:.96rem;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdx-quick-connect__selected-overline{font-size:.66rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--md-sys-color-on-surface-variant, inherit)}.pdx-quick-connect__option-badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;font-size:.68rem;font-weight:600;background:color-mix(in srgb,currentColor 10%,transparent);color:color-mix(in srgb,currentColor 82%,transparent);white-space:nowrap}.pdx-quick-connect__option-code,.pdx-quick-connect__selected-path{font-family:var(--pdx-font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);font-size:.74rem;color:var(--md-sys-color-primary, inherit);overflow-wrap:anywhere}.pdx-quick-connect__selected-path{display:inline-flex;align-items:center;padding:1px 7px;border-radius:6px;background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 10%,transparent);border:1px solid color-mix(in srgb,var(--md-sys-color-primary, currentColor) 22%,transparent)}.pdx-quick-connect__option-code{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdx-quick-connect__option-description,.pdx-quick-connect__selected-description{margin:0;font-size:.78rem;line-height:1.38;color:var(--md-sys-color-on-surface-variant, inherit)}.pdx-quick-connect__option-check{width:18px;height:18px;font-size:18px;color:var(--md-sys-color-primary, inherit);flex-shrink:0}.pdx-quick-connect__selected-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:flex-start;gap:12px;padding:12px 14px;border-radius:12px;background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 6%,var(--md-sys-color-surface-container-low, transparent));border:1px solid color-mix(in srgb,var(--md-sys-color-primary, currentColor) 24%,transparent);transition:border-color .14s ease,background .14s ease}.pdx-quick-connect__selected-card.is-clickable{cursor:pointer}.pdx-quick-connect__selected-card.is-clickable:hover{border-color:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 42%,transparent);background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 9%,var(--md-sys-color-surface-container-low, transparent))}.pdx-quick-connect__selected-content{display:grid;gap:4px;min-width:0;flex:1 1 auto}.pdx-quick-connect__selected-paths{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}.pdx-quick-connect__selected-key{font-family:var(--pdx-font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);font-size:.72rem;color:var(--md-sys-color-on-surface-variant, inherit)}.pdx-quick-connect__selected-actions{display:flex;align-items:center;align-self:center;flex-shrink:0}.pdx-quick-connect__change-btn{appearance:none;display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:8px;border:1px solid color-mix(in srgb,var(--md-sys-color-primary, currentColor) 32%,transparent);background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 10%,transparent);color:var(--md-sys-color-primary, inherit);font-size:.78rem;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .12s ease,border-color .12s ease}.pdx-quick-connect__change-btn:hover:not(:disabled){background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 18%,transparent);border-color:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 48%,transparent)}.pdx-quick-connect__change-btn mat-icon{width:16px;height:16px;font-size:16px}@container (max-width: 520px){.pdx-quick-connect__selected-card{grid-template-columns:auto minmax(0,1fr)}.pdx-quick-connect__selected-actions{grid-column:1 / -1;justify-content:flex-end}}.pdx-quick-connect__hint{color:var(--md-sys-color-on-surface-variant, inherit);font-size:.8rem;line-height:1.35}.pdx-quick-connect__advanced{font-size:.84rem;padding-top:4px;border-top:1px dashed color-mix(in srgb,var(--md-sys-color-outline-variant, currentColor) 45%,transparent)}.pdx-quick-connect__advanced>summary{cursor:pointer;-webkit-user-select:none;user-select:none;color:var(--md-sys-color-on-surface-variant, inherit);font-weight:500;padding:4px 0}.pdx-quick-connect__advanced[open]>summary{margin-bottom:8px}.pdx-quick-connect__path-field{width:100%}\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
60327
61521
  }
60328
61522
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ResourceQuickConnectComponent, decorators: [{
60329
61523
  type: Component,
@@ -60361,12 +61555,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
60361
61555
  </button>
60362
61556
  </div>
60363
61557
  }
61558
+ @if (selectedResource(); as selected) {
61559
+ <div
61560
+ class="pdx-quick-connect__selected-card"
61561
+ data-testid="quick-connect-selected-card"
61562
+ [class.is-clickable]="!disabled"
61563
+ (click)="openResourceLookupPicker($event)"
61564
+ >
61565
+ <span class="pdx-quick-connect__selected-icon" aria-hidden="true">
61566
+ <mat-icon [praxisIcon]="selected.icon || 'api'"></mat-icon>
61567
+ </span>
61568
+ <div class="pdx-quick-connect__selected-content">
61569
+ <span class="pdx-quick-connect__selected-overline">{{ label || tx('resource') }}</span>
61570
+ <div class="pdx-quick-connect__selected-header">
61571
+ <strong class="pdx-quick-connect__selected-title">{{ selected.label }}</strong>
61572
+ @if (selected.group) {
61573
+ <span class="pdx-quick-connect__option-badge">{{ selected.group }}</span>
61574
+ }
61575
+ @if (selected.readOnly) {
61576
+ <span class="pdx-quick-connect__option-badge pdx-quick-connect__option-badge--readonly">
61577
+ {{ tx('readOnly', 'Somente leitura') }}
61578
+ </span>
61579
+ }
61580
+ </div>
61581
+ <div class="pdx-quick-connect__selected-paths">
61582
+ <code class="pdx-quick-connect__selected-path">{{ selected.value }}</code>
61583
+ @if (selected.resourceKey && selected.resourceKey !== selected.value && selected.resourceKey !== selected.label) {
61584
+ <span class="pdx-quick-connect__selected-key">{{ selected.resourceKey }}</span>
61585
+ }
61586
+ </div>
61587
+ @if (selected.description) {
61588
+ <p class="pdx-quick-connect__selected-description">{{ selected.description }}</p>
61589
+ }
61590
+ </div>
61591
+ <div class="pdx-quick-connect__selected-actions">
61592
+ <button
61593
+ type="button"
61594
+ class="pdx-quick-connect__change-btn"
61595
+ data-testid="quick-connect-change-resource-btn"
61596
+ [attr.aria-expanded]="lookupPickerOpen"
61597
+ [disabled]="disabled"
61598
+ (click)="openResourceLookupPicker($event)"
61599
+ >
61600
+ <mat-icon [praxisIcon]="lookupPickerOpen ? 'expand_less' : 'manage_search'"></mat-icon>
61601
+ <span>{{ tx('changeResource', 'Trocar recurso') }}</span>
61602
+ </button>
61603
+ </div>
61604
+ </div>
61605
+ }
60364
61606
  @if (selectorType && selectorInputs) {
60365
- <div class="pdx-quick-connect__selector">
61607
+ <div
61608
+ class="pdx-quick-connect__selector"
61609
+ [class.is-collapsed-by-card]="!!selectedResource() || lookupPickerOpen"
61610
+ >
60366
61611
  <ng-container *ngComponentOutlet="selectorType" />
60367
61612
  </div>
60368
- } @else if (!selectorType && discoveredResources.length) {
60369
- <div class="pdx-quick-connect__Fallback pdx-quick-connect__fallback pdx-quick-connect__selector" data-testid="quick-connect-rich-fallback">
61613
+ }
61614
+ @if ((lookupPickerOpen || !selectorType) && discoveredResources.length) {
61615
+ <div
61616
+ class="pdx-quick-connect__Fallback pdx-quick-connect__fallback pdx-quick-connect__selector"
61617
+ data-testid="quick-connect-rich-fallback"
61618
+ >
60370
61619
  <mat-form-field appearance="outline" class="pdx-quick-connect__search-field" subscriptSizing="dynamic">
60371
61620
  <mat-label>{{ label || tx('resource') }}</mat-label>
60372
61621
  <mat-icon matPrefix [praxisIcon]="'search'"></mat-icon>
@@ -60376,6 +61625,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
60376
61625
  [disabled]="disabled"
60377
61626
  [placeholder]="tx('searchPlaceholder')"
60378
61627
  [(ngModel)]="fallbackSearchTerm"
61628
+ (keydown.escape)="lookupPickerOpen = false"
60379
61629
  data-testid="quick-connect-search-input"
60380
61630
  />
60381
61631
  </mat-form-field>
@@ -60423,42 +61673,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
60423
61673
  @if (!catalogLoading && !catalogError && !selectorInputs && !discoveredResources.length) {
60424
61674
  <p class="pdx-quick-connect__status" role="status">{{ tx('empty') }}</p>
60425
61675
  }
60426
- @if (selectedResource(); as selected) {
60427
- <div class="pdx-quick-connect__selected-card" data-testid="quick-connect-selected-card">
60428
- <span class="pdx-quick-connect__selected-icon" aria-hidden="true">
60429
- <mat-icon [praxisIcon]="selected.icon || 'api'"></mat-icon>
60430
- </span>
60431
- <div class="pdx-quick-connect__selected-content">
60432
- <div class="pdx-quick-connect__selected-header">
60433
- <strong class="pdx-quick-connect__selected-title">{{ selected.label }}</strong>
60434
- @if (selected.group) {
60435
- <span class="pdx-quick-connect__option-badge">{{ selected.group }}</span>
60436
- }
60437
- @if (selected.readOnly) {
60438
- <span class="pdx-quick-connect__option-badge pdx-quick-connect__option-badge--readonly">
60439
- {{ tx('readOnly', 'Somente leitura') }}
60440
- </span>
60441
- }
60442
- </div>
60443
- <div class="pdx-quick-connect__selected-paths">
60444
- <code class="pdx-quick-connect__selected-path">{{ selected.value }}</code>
60445
- @if (selected.resourceKey && selected.resourceKey !== selected.value && selected.resourceKey !== selected.label) {
60446
- <span class="pdx-quick-connect__selected-key">{{ selected.resourceKey }}</span>
60447
- }
60448
- </div>
60449
- @if (selected.description) {
60450
- <p class="pdx-quick-connect__selected-description">{{ selected.description }}</p>
60451
- }
60452
- </div>
60453
- </div>
61676
+ @if (!selectedResource() || !!hint?.trim()) {
61677
+ <small class="pdx-quick-connect__hint">{{ resolvedHint() }}</small>
60454
61678
  }
60455
- <small class="pdx-quick-connect__hint">{{ resolvedHint() }}</small>
61679
+ <div class="pdx-quick-connect__projected">
61680
+ <ng-content />
61681
+ </div>
60456
61682
  <details
60457
61683
  class="pdx-quick-connect__advanced"
60458
61684
  [open]="shouldOpenAdvanced()"
60459
- (toggle)="onAdvancedToggle($event)"
60460
61685
  >
60461
- <summary>{{ tx('advanced') }}</summary>
61686
+ <summary (click)="onAdvancedSummaryClick($event)">{{ tx('advanced') }}</summary>
60462
61687
  <mat-form-field appearance="outline" class="pdx-quick-connect__path-field">
60463
61688
  <mat-label>{{ tx('path') }}</mat-label>
60464
61689
  <input
@@ -60487,7 +61712,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
60487
61712
  }
60488
61713
  </details>
60489
61714
  </div>
60490
- `, styles: [":host{display:block;container-type:inline-size;min-width:0}.pdx-quick-connect{display:grid;gap:10px;min-width:0;padding:12px;border-radius:12px;border:1px solid var(--md-sys-color-outline-variant, rgba(148, 163, 184, .28));background:var(--md-sys-color-surface, transparent);color:var(--md-sys-color-on-surface, inherit)}:host-context(.editor-card) .pdx-quick-connect,:host-context(.action-group) .pdx-quick-connect{padding:0;border:0;border-radius:0;background:transparent}.pdx-quick-connect__selector{min-width:0}@container (min-width: 560px){.pdx-quick-connect:has(>.pdx-quick-connect__selector):has(>.pdx-quick-connect__selected-card){grid-template-columns:minmax(260px,1fr) minmax(260px,1.2fr);align-items:start;column-gap:14px}.pdx-quick-connect:has(>.pdx-quick-connect__selector):has(>.pdx-quick-connect__selected-card)>.pdx-quick-connect__status,.pdx-quick-connect:has(>.pdx-quick-connect__selector):has(>.pdx-quick-connect__selected-card)>.pdx-quick-connect__error-row,.pdx-quick-connect:has(>.pdx-quick-connect__selector):has(>.pdx-quick-connect__selected-card)>.pdx-quick-connect__hint,.pdx-quick-connect:has(>.pdx-quick-connect__selector):has(>.pdx-quick-connect__selected-card)>.pdx-quick-connect__advanced{grid-column:1 / -1}}.pdx-quick-connect.is-disabled{opacity:.68}.pdx-quick-connect__status{margin:0;font-size:.85rem;color:var(--md-sys-color-on-surface-variant, inherit)}.pdx-quick-connect__error-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.pdx-quick-connect__retry{appearance:none;border:1px solid var(--md-sys-color-outline, rgba(148, 163, 184, .45));background:transparent;color:var(--md-sys-color-primary, inherit);border-radius:8px;padding:4px 10px;font-size:.8rem;font-weight:600;cursor:pointer}.pdx-quick-connect__fallback{display:grid;gap:8px}.pdx-quick-connect__search-field{width:100%}.pdx-quick-connect__option-list{display:flex;flex-direction:column;gap:4px;max-height:240px;overflow-y:auto;padding:4px;border-radius:10px;border:1px solid var(--md-sys-color-outline-variant, rgba(148, 163, 184, .24));background:var(--md-sys-color-surface-container-low, rgba(148, 163, 184, .04))}.pdx-quick-connect__option-item{display:flex;align-items:flex-start;gap:10px;width:100%;padding:8px 10px;border:1px solid transparent;border-radius:8px;background:transparent;color:inherit;font:inherit;text-align:start;cursor:pointer;transition:background .12s ease,border-color .12s ease}.pdx-quick-connect__option-item:hover:not(:disabled),.pdx-quick-connect__option-item.is-selected{background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 10%,transparent);border-color:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 24%,transparent)}.pdx-quick-connect__option-icon,.pdx-quick-connect__selected-icon{width:28px;height:28px;border-radius:8px;background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 12%,transparent);color:var(--md-sys-color-primary, inherit);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:1px}.pdx-quick-connect__option-icon mat-icon,.pdx-quick-connect__selected-icon mat-icon{width:16px;height:16px;font-size:16px}.pdx-quick-connect__option-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1 1 auto}.pdx-quick-connect__option-header,.pdx-quick-connect__selected-header{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}.pdx-quick-connect__option-label,.pdx-quick-connect__selected-title{font-size:.86rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdx-quick-connect__option-badge{display:inline-flex;align-items:center;padding:1px 6px;border-radius:999px;font-size:.68rem;font-weight:600;background:color-mix(in srgb,currentColor 10%,transparent);color:color-mix(in srgb,currentColor 78%,transparent);white-space:nowrap}.pdx-quick-connect__option-code,.pdx-quick-connect__selected-path{font-family:var(--pdx-font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);font-size:.72rem;color:var(--md-sys-color-primary, inherit);overflow-wrap:anywhere}.pdx-quick-connect__option-code{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdx-quick-connect__option-description,.pdx-quick-connect__selected-description{margin:0;font-size:.75rem;line-height:1.3;color:var(--md-sys-color-on-surface-variant, inherit)}.pdx-quick-connect__option-check{width:18px;height:18px;font-size:18px;color:var(--md-sys-color-primary, inherit);flex-shrink:0}.pdx-quick-connect__selected-card{display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border-radius:10px;background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 6%,transparent);border:1px solid color-mix(in srgb,var(--md-sys-color-primary, currentColor) 18%,transparent)}.pdx-quick-connect__selected-content{display:grid;gap:2px;min-width:0;flex:1 1 auto}.pdx-quick-connect__selected-paths{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}.pdx-quick-connect__selected-key{font-size:.7rem;color:var(--md-sys-color-on-surface-variant, inherit)}.pdx-quick-connect__hint{color:var(--md-sys-color-on-surface-variant, inherit);font-size:.82rem;line-height:1.35}.pdx-quick-connect__advanced{font-size:.85rem}.pdx-quick-connect__advanced>summary{cursor:pointer;-webkit-user-select:none;user-select:none;color:var(--md-sys-color-on-surface-variant, inherit);font-weight:500;margin-bottom:8px}.pdx-quick-connect__path-field{width:100%}\n"] }]
61715
+ `, styles: [":host{display:block;container-type:inline-size;min-width:0}.pdx-quick-connect{display:grid;gap:10px;min-width:0;padding:12px;border-radius:12px;border:1px solid var(--md-sys-color-outline-variant, rgba(148, 163, 184, .28));background:var(--md-sys-color-surface, transparent);color:var(--md-sys-color-on-surface, inherit)}:host-context(.editor-card) .pdx-quick-connect,:host-context(.action-group) .pdx-quick-connect{padding:0;border:0;border-radius:0;background:transparent}.pdx-quick-connect__selector{min-width:0;width:100%}.pdx-quick-connect__selector.is-collapsed-by-card{height:0;min-height:0;overflow:hidden;opacity:0;pointer-events:none;margin-top:-10px}.pdx-quick-connect__projected{display:contents}.pdx-quick-connect.is-disabled{opacity:.68}.pdx-quick-connect__status{margin:0;font-size:.85rem;color:var(--md-sys-color-on-surface-variant, inherit)}.pdx-quick-connect__error-row{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.pdx-quick-connect__retry{appearance:none;border:1px solid var(--md-sys-color-outline, rgba(148, 163, 184, .45));background:transparent;color:var(--md-sys-color-primary, inherit);border-radius:8px;padding:4px 10px;font-size:.8rem;font-weight:600;cursor:pointer}.pdx-quick-connect__fallback{display:grid;gap:8px}.pdx-quick-connect__search-field{width:100%}.pdx-quick-connect__option-list{display:flex;flex-direction:column;gap:4px;max-height:240px;overflow-y:auto;padding:4px;border-radius:10px;border:1px solid var(--md-sys-color-outline-variant, rgba(148, 163, 184, .24));background:var(--md-sys-color-surface-container-low, rgba(148, 163, 184, .04))}.pdx-quick-connect__option-item{display:flex;align-items:flex-start;gap:10px;width:100%;padding:8px 10px;border:1px solid transparent;border-radius:8px;background:transparent;color:inherit;font:inherit;text-align:start;cursor:pointer;transition:background .12s ease,border-color .12s ease}.pdx-quick-connect__option-item:hover:not(:disabled),.pdx-quick-connect__option-item.is-selected{background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 10%,transparent);border-color:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 24%,transparent)}.pdx-quick-connect__option-icon{width:28px;height:28px;border-radius:8px;background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 12%,transparent);color:var(--md-sys-color-primary, inherit);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:1px}.pdx-quick-connect__option-icon mat-icon{width:16px;height:16px;font-size:16px}.pdx-quick-connect__selected-icon{width:40px;height:40px;border-radius:10px;background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 14%,transparent);border:1px solid color-mix(in srgb,var(--md-sys-color-primary, currentColor) 26%,transparent);color:var(--md-sys-color-primary, inherit);display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:2px}.pdx-quick-connect__selected-icon mat-icon{width:20px;height:20px;font-size:20px}.pdx-quick-connect__option-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1 1 auto}.pdx-quick-connect__option-header,.pdx-quick-connect__selected-header{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}.pdx-quick-connect__option-label{font-size:.86rem;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdx-quick-connect__selected-title{font-size:.96rem;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdx-quick-connect__selected-overline{font-size:.66rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--md-sys-color-on-surface-variant, inherit)}.pdx-quick-connect__option-badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;font-size:.68rem;font-weight:600;background:color-mix(in srgb,currentColor 10%,transparent);color:color-mix(in srgb,currentColor 82%,transparent);white-space:nowrap}.pdx-quick-connect__option-code,.pdx-quick-connect__selected-path{font-family:var(--pdx-font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);font-size:.74rem;color:var(--md-sys-color-primary, inherit);overflow-wrap:anywhere}.pdx-quick-connect__selected-path{display:inline-flex;align-items:center;padding:1px 7px;border-radius:6px;background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 10%,transparent);border:1px solid color-mix(in srgb,var(--md-sys-color-primary, currentColor) 22%,transparent)}.pdx-quick-connect__option-code{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdx-quick-connect__option-description,.pdx-quick-connect__selected-description{margin:0;font-size:.78rem;line-height:1.38;color:var(--md-sys-color-on-surface-variant, inherit)}.pdx-quick-connect__option-check{width:18px;height:18px;font-size:18px;color:var(--md-sys-color-primary, inherit);flex-shrink:0}.pdx-quick-connect__selected-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:flex-start;gap:12px;padding:12px 14px;border-radius:12px;background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 6%,var(--md-sys-color-surface-container-low, transparent));border:1px solid color-mix(in srgb,var(--md-sys-color-primary, currentColor) 24%,transparent);transition:border-color .14s ease,background .14s ease}.pdx-quick-connect__selected-card.is-clickable{cursor:pointer}.pdx-quick-connect__selected-card.is-clickable:hover{border-color:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 42%,transparent);background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 9%,var(--md-sys-color-surface-container-low, transparent))}.pdx-quick-connect__selected-content{display:grid;gap:4px;min-width:0;flex:1 1 auto}.pdx-quick-connect__selected-paths{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}.pdx-quick-connect__selected-key{font-family:var(--pdx-font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);font-size:.72rem;color:var(--md-sys-color-on-surface-variant, inherit)}.pdx-quick-connect__selected-actions{display:flex;align-items:center;align-self:center;flex-shrink:0}.pdx-quick-connect__change-btn{appearance:none;display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:8px;border:1px solid color-mix(in srgb,var(--md-sys-color-primary, currentColor) 32%,transparent);background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 10%,transparent);color:var(--md-sys-color-primary, inherit);font-size:.78rem;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .12s ease,border-color .12s ease}.pdx-quick-connect__change-btn:hover:not(:disabled){background:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 18%,transparent);border-color:color-mix(in srgb,var(--md-sys-color-primary, currentColor) 48%,transparent)}.pdx-quick-connect__change-btn mat-icon{width:16px;height:16px;font-size:16px}@container (max-width: 520px){.pdx-quick-connect__selected-card{grid-template-columns:auto minmax(0,1fr)}.pdx-quick-connect__selected-actions{grid-column:1 / -1;justify-content:flex-end}}.pdx-quick-connect__hint{color:var(--md-sys-color-on-surface-variant, inherit);font-size:.8rem;line-height:1.35}.pdx-quick-connect__advanced{font-size:.84rem;padding-top:4px;border-top:1px dashed color-mix(in srgb,var(--md-sys-color-outline-variant, currentColor) 45%,transparent)}.pdx-quick-connect__advanced>summary{cursor:pointer;-webkit-user-select:none;user-select:none;color:var(--md-sys-color-on-surface-variant, inherit);font-weight:500;padding:4px 0}.pdx-quick-connect__advanced[open]>summary{margin-bottom:8px}.pdx-quick-connect__path-field{width:100%}\n"] }]
60491
61716
  }], propDecorators: { resourcePath: [{
60492
61717
  type: Input
60493
61718
  }], resourcePathChange: [{
@@ -62548,6 +63773,360 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
62548
63773
  * entre widgets heterogêneos (KPIs, Charts, Tabelas, Filtros, Formulários).
62549
63774
  */
62550
63775
 
63776
+ const UUID$1 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
63777
+ const ICON = /^[a-z][a-z0-9_]*(?![\s\S])/;
63778
+ const LENGTH = /^(0|[0-9]+(px|rem))(?![\s\S])/;
63779
+ const TEXT = /^(?![\s\S]*[\u0000-\u001f\u007f\u2028\u2029])[^\u0009-\u000d\u0020\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff](?:[\s\S]*[^\u0009-\u000d\u0020\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff])?(?![\s\S])/u;
63780
+ const FORM_INPUTS = ['config', 'mode', 'emptyState', 'presentationModeGlobal', 'backConfig',
63781
+ 'presentation', 'notifyIfOutdated', 'snoozeMs', 'autoOpenSettingsOnOutdated'];
63782
+ const TABLE_INPUTS = ['config', 'resourcePath', 'horizontalScroll'];
63783
+ /** Structural profile only. Does not attest native configs, ports, icons, sources or permissions. */
63784
+ function decodePageAuthoringDocument(value) {
63785
+ const diagnostics = [];
63786
+ try {
63787
+ value = cloneBoundedUiLayoutJsonDocument(value);
63788
+ }
63789
+ catch {
63790
+ return { ok: false, diagnostics: [{ code: 'PAGE_DOCUMENT_INVALID_JSON_OR_BOUNDS', path: '' }] };
63791
+ }
63792
+ const check = new ProfileCheck(diagnostics);
63793
+ if (check.object(value, '', ['kind', 'version', 'config'], ['kind', 'version', 'config'])) {
63794
+ check.oneOf(value['kind'], '/kind', ['praxis.dynamic-page.editor']);
63795
+ check.oneOf(value['version'], '/version', [1]);
63796
+ const config = value['config'];
63797
+ if (check.object(config, '/config', ['definition', 'presentation', 'navigation'], ['definition', 'presentation', 'navigation'])) {
63798
+ check.definition(config['definition']);
63799
+ check.presentation(config['presentation']);
63800
+ check.navigation(config['navigation']);
63801
+ }
63802
+ }
63803
+ return diagnostics.length
63804
+ ? { ok: false, diagnostics }
63805
+ : { ok: true, value: JSON.parse(JSON.stringify(value)) };
63806
+ }
63807
+ /** Encodes only admitted structure, without adding defaults, sorting arrays or dropping properties. */
63808
+ function encodePageAuthoringDocument(value) {
63809
+ const result = decodePageAuthoringDocument(value);
63810
+ return result.ok ? { ok: true, value: JSON.stringify(result.value) } : result;
63811
+ }
63812
+ /** Adds mandatory owner validation; success is still not provenance or publication authority. */
63813
+ function validatePageAuthoringDocument(value, validators) {
63814
+ const result = decodePageAuthoringDocument(value);
63815
+ if (!result.ok)
63816
+ return result;
63817
+ const diagnostics = [];
63818
+ result.value.config.definition.widgets.forEach((widget, index) => {
63819
+ const validator = Object.prototype.hasOwnProperty.call(validators, widget.definition.id)
63820
+ ? validators[widget.definition.id] : undefined;
63821
+ if (!validator) {
63822
+ diagnostics.push({ code: 'OWNER_VALIDATOR_MISSING', path: `/config/definition/widgets/${index}` });
63823
+ return;
63824
+ }
63825
+ // A validator may inspect the cloned input, but cannot mutate the returned authoring document.
63826
+ const isolated = JSON.parse(JSON.stringify(widget));
63827
+ try {
63828
+ diagnostics.push(...validator(isolated).map((diagnostic) => ({
63829
+ code: diagnostic.code,
63830
+ path: `/config/definition/widgets/${index}${diagnostic.path}`,
63831
+ })));
63832
+ }
63833
+ catch {
63834
+ diagnostics.push({ code: 'OWNER_VALIDATION_FAILED', path: `/config/definition/widgets/${index}` });
63835
+ }
63836
+ });
63837
+ return diagnostics.length ? { ok: false, diagnostics } : result;
63838
+ }
63839
+ class ProfileCheck {
63840
+ diagnostics;
63841
+ constructor(diagnostics) {
63842
+ this.diagnostics = diagnostics;
63843
+ }
63844
+ fail(path, code = 'PAGE_PROFILE_INVALID') { this.diagnostics.push({ code, path }); }
63845
+ object(value, path, keys, required = []) {
63846
+ if (!isRecord(value)) {
63847
+ this.fail(path);
63848
+ return false;
63849
+ }
63850
+ for (const key of Object.keys(value))
63851
+ if (!keys.includes(key))
63852
+ this.fail(`${path}/${pointer(key)}`, 'PAGE_PROFILE_UNSUPPORTED');
63853
+ for (const key of required)
63854
+ if (!Object.prototype.hasOwnProperty.call(value, key))
63855
+ this.fail(`${path}/${pointer(key)}`);
63856
+ return true;
63857
+ }
63858
+ oneOf(value, path, allowed) {
63859
+ if (!allowed.includes(value))
63860
+ this.fail(path);
63861
+ }
63862
+ text(value, path, max, min = 1, trimmed = true) {
63863
+ if (typeof value !== 'string' || [...value].length < min || [...value].length > max
63864
+ || (trimmed && !TEXT.test(value)))
63865
+ this.fail(path);
63866
+ }
63867
+ uuid(value, path) { if (typeof value !== 'string' || (value.length !== 36 || !UUID$1.test(value)))
63868
+ this.fail(path); }
63869
+ integer(value, path, min, max = Infinity) {
63870
+ if (typeof value !== 'number' || !Number.isInteger(value) || value < min || value > max)
63871
+ this.fail(path);
63872
+ }
63873
+ icon(value, path) {
63874
+ this.text(value, path, 80);
63875
+ if (typeof value === 'string' && !ICON.test(value))
63876
+ this.fail(path);
63877
+ }
63878
+ definition(value) {
63879
+ const path = '/config/definition';
63880
+ if (!this.object(value, path, ['widgets', 'layout', 'composition'], ['widgets']))
63881
+ return;
63882
+ const widgets = value['widgets'];
63883
+ const keys = new Set();
63884
+ if (!Array.isArray(widgets))
63885
+ this.fail(`${path}/widgets`);
63886
+ else
63887
+ widgets.forEach((widget, index) => {
63888
+ const at = `${path}/widgets/${index}`;
63889
+ if (!this.object(widget, at, ['key', 'definition'], ['key', 'definition']))
63890
+ return;
63891
+ this.uuid(widget['key'], `${at}/key`);
63892
+ if (typeof widget['key'] === 'string') {
63893
+ if (keys.has(widget['key']))
63894
+ this.fail(`${at}/key`, 'DUPLICATE_WIDGET');
63895
+ keys.add(widget['key']);
63896
+ }
63897
+ const definition = widget['definition'];
63898
+ if (!this.object(definition, `${at}/definition`, ['id', 'inputs'], ['id', 'inputs']))
63899
+ return;
63900
+ this.oneOf(definition['id'], `${at}/definition/id`, ['praxis-dynamic-form', 'praxis-table']);
63901
+ this.inputs(definition['inputs'], `${at}/definition/inputs`, definition['id']);
63902
+ });
63903
+ if (Object.prototype.hasOwnProperty.call(value, 'layout'))
63904
+ this.layout(value['layout'], `${path}/layout`);
63905
+ if (Object.prototype.hasOwnProperty.call(value, 'composition'))
63906
+ this.composition(value['composition'], `${path}/composition`, keys);
63907
+ }
63908
+ inputs(value, path, component) {
63909
+ if (!this.object(value, path, component === 'praxis-dynamic-form' ? FORM_INPUTS : TABLE_INPUTS, ['config']))
63910
+ return;
63911
+ if (!isRecord(value['config']))
63912
+ this.fail(`${path}/config`);
63913
+ for (const [key, input] of Object.entries(value)) {
63914
+ const at = `${path}/${key}`;
63915
+ switch (key) {
63916
+ case 'config': break; // Its native schema/policy belongs to the child owner.
63917
+ case 'mode':
63918
+ this.oneOf(input, at, ['create', 'edit', 'view', 'presentation', 'dossier']);
63919
+ break;
63920
+ case 'emptyState':
63921
+ case 'presentation':
63922
+ if (input !== null && !isRecord(input))
63923
+ this.fail(at);
63924
+ break;
63925
+ case 'backConfig':
63926
+ if (!isRecord(input))
63927
+ this.fail(at);
63928
+ break;
63929
+ case 'presentationModeGlobal':
63930
+ if (input !== null && typeof input !== 'boolean')
63931
+ this.fail(at);
63932
+ break;
63933
+ case 'notifyIfOutdated':
63934
+ this.oneOf(input, at, ['inline', 'snackbar', 'both', 'none']);
63935
+ break;
63936
+ case 'snoozeMs':
63937
+ this.integer(input, at, 0);
63938
+ break;
63939
+ case 'autoOpenSettingsOnOutdated':
63940
+ if (typeof input !== 'boolean')
63941
+ this.fail(at);
63942
+ break;
63943
+ case 'resourcePath':
63944
+ if (input !== null)
63945
+ this.text(input, at, 1024, 0, false);
63946
+ break;
63947
+ case 'horizontalScroll':
63948
+ this.oneOf(input, at, ['auto', 'wrap', 'none']);
63949
+ break;
63950
+ }
63951
+ }
63952
+ }
63953
+ layout(value, path) {
63954
+ if (!this.object(value, path, ['orientation', 'columns', 'gap', 'paddingInline', 'breakpoints']))
63955
+ return;
63956
+ for (const [key, entry] of Object.entries(value)) {
63957
+ const at = `${path}/${key}`;
63958
+ if (key === 'orientation')
63959
+ this.oneOf(entry, at, ['vertical', 'columns']);
63960
+ if (key === 'columns')
63961
+ this.integer(entry, at, 1, 24);
63962
+ if ((key === 'gap' || key === 'paddingInline') && (typeof entry !== 'string' || !LENGTH.test(entry)))
63963
+ this.fail(at);
63964
+ if (key === 'breakpoints' && this.object(entry, at, ['sm', 'md', 'lg', 'xl'])) {
63965
+ for (const [breakpoint, columns] of Object.entries(entry))
63966
+ this.integer(columns, `${at}/${breakpoint}`, 1, 24);
63967
+ }
63968
+ }
63969
+ }
63970
+ composition(value, path, widgets) {
63971
+ if (!this.object(value, path, ['version', 'links'], ['links']))
63972
+ return;
63973
+ if (Object.prototype.hasOwnProperty.call(value, 'version'))
63974
+ this.oneOf(value['version'], `${path}/version`, ['1.0.0']);
63975
+ if (!Array.isArray(value['links'])) {
63976
+ this.fail(`${path}/links`);
63977
+ return;
63978
+ }
63979
+ const ids = new Set();
63980
+ value['links'].forEach((link, index) => {
63981
+ const at = `${path}/links/${index}`;
63982
+ if (!this.object(link, at, ['id', 'from', 'to', 'intent'], ['id', 'from', 'to', 'intent']))
63983
+ return;
63984
+ this.uuid(link['id'], `${at}/id`);
63985
+ if (typeof link['id'] === 'string') {
63986
+ if (ids.has(link['id']))
63987
+ this.fail(`${at}/id`, 'DUPLICATE_LINK');
63988
+ ids.add(link['id']);
63989
+ }
63990
+ this.oneOf(link['intent'], `${at}/intent`, ['event-propagation']);
63991
+ for (const [side, direction] of [['from', 'output'], ['to', 'input']]) {
63992
+ const endpoint = link[side];
63993
+ if (!this.object(endpoint, `${at}/${side}`, ['kind', 'ref'], ['kind', 'ref']))
63994
+ continue;
63995
+ this.oneOf(endpoint['kind'], `${at}/${side}/kind`, ['component-port']);
63996
+ const ref = endpoint['ref'];
63997
+ if (!this.object(ref, `${at}/${side}/ref`, ['widget', 'port', 'direction'], ['widget', 'port', 'direction']))
63998
+ continue;
63999
+ this.uuid(ref['widget'], `${at}/${side}/ref/widget`);
64000
+ if (typeof ref['widget'] === 'string' && !widgets.has(ref['widget']))
64001
+ this.fail(`${at}/${side}/ref/widget`, 'ORPHAN_LINK');
64002
+ this.text(ref['port'], `${at}/${side}/ref/port`, 255);
64003
+ this.oneOf(ref['direction'], `${at}/${side}/ref/direction`, [direction]);
64004
+ }
64005
+ });
64006
+ }
64007
+ presentation(value) {
64008
+ const path = '/config/presentation';
64009
+ if (!this.object(value, path, ['title', 'icon', 'description'], ['title', 'icon']))
64010
+ return;
64011
+ this.text(value['title'], `${path}/title`, 160);
64012
+ this.icon(value['icon'], `${path}/icon`);
64013
+ if (Object.prototype.hasOwnProperty.call(value, 'description'))
64014
+ this.text(value['description'], `${path}/description`, 2000, 0, false);
64015
+ }
64016
+ navigation(value) {
64017
+ const path = '/config/navigation';
64018
+ if (!Array.isArray(value)) {
64019
+ this.fail(path);
64020
+ return;
64021
+ }
64022
+ const ids = new Set();
64023
+ value.forEach((binding, index) => {
64024
+ const at = `${path}/${index}`;
64025
+ if (!this.object(binding, at, ['id', 'groupId', 'label', 'icon', 'order'], ['id', 'groupId', 'label', 'icon', 'order']))
64026
+ return;
64027
+ this.uuid(binding['id'], `${at}/id`);
64028
+ this.uuid(binding['groupId'], `${at}/groupId`);
64029
+ if (typeof binding['id'] === 'string') {
64030
+ if (ids.has(binding['id']))
64031
+ this.fail(`${at}/id`, 'DUPLICATE_BINDING');
64032
+ ids.add(binding['id']);
64033
+ }
64034
+ this.text(binding['label'], `${at}/label`, 160);
64035
+ this.icon(binding['icon'], `${at}/icon`);
64036
+ this.integer(binding['order'], `${at}/order`, 0, 2147483647);
64037
+ });
64038
+ }
64039
+ }
64040
+ function pointer(key) { return key.replace(/~/g, '~0').replace(/\//g, '~1'); }
64041
+ function isRecord(value) {
64042
+ return value !== null && typeof value === 'object' && !Array.isArray(value);
64043
+ }
64044
+
64045
+ /** Pure authorial transformation. IDs are allocated by the caller's canonical catalog.
64046
+ * Native validation, source authorization, hashes and atomic creation remain server-owned.
64047
+ */
64048
+ function copyPageAuthoringDocument(source, request) {
64049
+ const decoded = decodePageAuthoringDocument(source);
64050
+ if (!decoded.ok)
64051
+ return decoded;
64052
+ const document = decoded.value;
64053
+ const diagnostics = [];
64054
+ const uuid = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
64055
+ const canonicalUuid = (value) => typeof value === 'string' && value.length === 36 && uuid.test(value);
64056
+ const fail = () => { diagnostics.push({ code: 'PAGE_COPY_IDENTITY_INVALID', path: '' }); };
64057
+ if (!canonicalUuid(request.sourcePageId) || !canonicalUuid(request.targetPageId)
64058
+ || request.sourcePageId === request.targetPageId)
64059
+ fail();
64060
+ const widgets = document.config.definition.widgets;
64061
+ const links = document.config.definition.composition?.links ?? [];
64062
+ const expected = new Set([
64063
+ ...widgets.map(widget => `widget:${widget.key}`),
64064
+ ...links.map(link => `link:${link.id}`),
64065
+ ]);
64066
+ const sourceIds = new Set([request.sourcePageId, ...widgets.map(widget => widget.key), ...links.map(link => link.id)]);
64067
+ if (sourceIds.has(request.targetPageId))
64068
+ fail();
64069
+ const destinations = new Set([request.targetPageId]);
64070
+ const mapped = new Map();
64071
+ for (const entry of request.identityMap) {
64072
+ const key = `${entry.kind}:${entry.from}`;
64073
+ if (!expected.has(key) || mapped.has(key) || !canonicalUuid(entry.to)
64074
+ || destinations.has(entry.to) || sourceIds.has(entry.to))
64075
+ fail();
64076
+ mapped.set(key, entry.to);
64077
+ destinations.add(entry.to);
64078
+ }
64079
+ if (mapped.size !== expected.size || [...expected].some(key => !mapped.has(key)))
64080
+ fail();
64081
+ if (diagnostics.length)
64082
+ return { ok: false, diagnostics };
64083
+ for (const widget of widgets)
64084
+ widget.key = mapped.get(`widget:${widget.key}`);
64085
+ for (const link of links) {
64086
+ link.id = mapped.get(`link:${link.id}`);
64087
+ // The profile check proves component-port endpoints; links use only the widget namespace.
64088
+ if (link.from.kind === 'component-port')
64089
+ link.from.ref.widget = mapped.get(`widget:${link.from.ref.widget}`);
64090
+ if (link.to.kind === 'component-port')
64091
+ link.to.ref.widget = mapped.get(`widget:${link.to.ref.widget}`);
64092
+ }
64093
+ document.config.presentation.title = request.title;
64094
+ document.config.navigation = [];
64095
+ const checked = decodePageAuthoringDocument(document);
64096
+ if (!checked.ok)
64097
+ return checked;
64098
+ return { ok: true, value: {
64099
+ pageId: request.targetPageId,
64100
+ document: checked.value,
64101
+ transformRef: 'praxis.page-copy/1',
64102
+ identityMap: request.identityMap.map(entry => ({ ...entry })),
64103
+ } };
64104
+ }
64105
+
64106
+ const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
64107
+ /** Materializes a server/catalog identity under the host's registered namespace.
64108
+ * This pure helper cannot attest namespace registration or the authenticated scope.
64109
+ */
64110
+ function buildPublishedPageIdentity(pageId, registeredNamespace, scope = {}) {
64111
+ requirePageUuid(pageId);
64112
+ if (!/^\/(?:[^/?#\\\s]+\/)*[^/?#\\\s]+$/u.test(registeredNamespace)
64113
+ || registeredNamespace.split('/').some(segment => segment === '.' || segment === '..')
64114
+ || /[%\u0000-\u001f\u007f]/u.test(registeredNamespace)) {
64115
+ throw new TypeError('A canonical registered page namespace is required.');
64116
+ }
64117
+ return { ...scope, routePath: `${registeredNamespace}/${pageId}` };
64118
+ }
64119
+ /** Isolated, stable storage/runtime identity; authorial strings never choose child persistence. */
64120
+ function derivePageChildRuntimeId(pageId, widgetKey) {
64121
+ requirePageUuid(pageId);
64122
+ requirePageUuid(widgetKey);
64123
+ return `page:${pageId}:widget:${widgetKey}`;
64124
+ }
64125
+ function requirePageUuid(value) {
64126
+ if (typeof value !== 'string' || value.length !== 36 || !UUID.test(value))
64127
+ throw new TypeError('A canonical page/widget UUID is required.');
64128
+ }
64129
+
62551
64130
  /*
62552
64131
  * Public API Surface of praxis-core
62553
64132
  */
@@ -62556,4 +64135,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
62556
64135
  * Generated bundle index. Do not edit.
62557
64136
  */
62558
64137
 
62559
- export { API_CONFIG_STORAGE_OPTIONS, API_URL, ASYNC_CONFIG_STORAGE, AllowedFileTypes, AnalyticsPresentationResolver, AnalyticsSchemaContractService, AnalyticsStatsRequestBuilderService, ApiConfigStorage, ApiEndpoint, BUILTIN_PAGE_LAYOUT_PRESETS, BUILTIN_PAGE_THEME_PRESETS, BUILTIN_SHELL_PRESETS, BUILTIN_WIDGET_SHELL_PRESETS, BulkOperationClientService, BulkSyncSession, BulkSyncStateService, COMPONENT_METADATA_REGISTRY_I18N_CONFIG, COMPONENT_METADATA_REGISTRY_I18N_NAMESPACE, CONFIG_STORAGE, CONNECTION_STORAGE, ComponentAuthoringManifestProjectionError, ComponentKeyService, ComponentMetadataRegistry, ComponentRuntimeProfileService, CompositionRuntimeFacade, CompositionValidatorService, ConsoleLoggerSink, CrudOperationResolutionService, DEFAULT_DYNAMIC_FORM_SCHEMA_CACHE_MAX_ENTRIES, DEFAULT_DYNAMIC_FORM_SCHEMA_CACHE_TTL_MS, DEFAULT_FIELD_SELECTOR_CONTROL_TYPE_MAP, DEFAULT_JSON_LOGIC_OPERATORS, DEFAULT_SCHEMA_REQUEST_TIMEOUT_MS, DEFAULT_TABLE_CONFIG, DOMAIN_CATALOG_COMPONENT_CONTEXT_PACK, DOMAIN_CATALOG_CONTEXT_HINT_SCHEMA_VERSION, DYNAMIC_PAGE_AI_CAPABILITIES, DYNAMIC_PAGE_COMPONENT_CONTEXT_PACK, DYNAMIC_PAGE_CONFIG_EDITOR, DYNAMIC_PAGE_SHELL_EDITOR, DefaultLoadingRenderer, DeferredAsyncConfigStorage, DomainCatalogService, DomainKnowledgeService, DomainRuleService, DynamicFormService, DynamicWidgetLoaderDirective, DynamicWidgetPageComponent, EDITORIAL_ALLOWED_CONTENT_FORMATS, EDITORIAL_COMPLIANCE_PRESETS, EDITORIAL_EXTERNAL_LINK_REL, EDITORIAL_FORM_TEMPLATE_CATALOG, EDITORIAL_HTML_ENABLED, EDITORIAL_MARKDOWN_IMAGES_ENABLED, EDITORIAL_SOLUTION_CATALOG, EDITORIAL_SOLUTION_PRESETS, EDITORIAL_THEME_PRESETS, EDITORIAL_WIDGET_CONVENTION_INPUTS, EDITORIAL_WIDGET_TAG, EFFECTIVE_UI_LAYOUT_COMPOSITION_SCHEMA_VERSION, EMPLOYEE_ONBOARDING_EDITORIAL_SOLUTION, EMPLOYEE_ONBOARDING_EDITORIAL_TEMPLATE, EMPLOYEE_ONBOARDING_GUIDED_EDITORIAL_SOLUTION, EMPLOYEE_ONBOARDING_GUIDED_EDITORIAL_TEMPLATE, EVENT_REGISTRATION_EDITORIAL_SOLUTION, EVENT_REGISTRATION_EDITORIAL_TEMPLATE, EffectiveUiLayoutContractError, EffectiveUiLayoutHttpError, EffectiveUiLayoutService, EmptyStateCardComponent, EnterpriseRuntimeContextObsoleteError, EnterpriseRuntimeContextService, ErrorMessageService, FIELD_METADATA_CAPABILITIES, FIELD_SELECTOR_REGISTRY_BASE, FIELD_SELECTOR_REGISTRY_DISABLE_DEFAULTS, FIELD_SELECTOR_REGISTRY_OVERRIDES, FORM_HOOKS, FORM_HOOKS_PRESETS, FORM_HOOKS_WHITELIST, FORM_HOOK_RESOLVERS, FieldControlType, FieldDataType, FieldSelectorRegistry, FormHooksRegistry, GLOBAL_ACTION_CATALOG, GLOBAL_ACTION_HANDLERS, GLOBAL_ACTION_UI_SCHEMAS, GLOBAL_ANALYTICS_SERVICE, GLOBAL_API_CLIENT, GLOBAL_CONFIG, GLOBAL_DIALOG_SERVICE, GLOBAL_ROUTE_GUARD_RESOLVER, GLOBAL_SURFACE_SERVICE, GLOBAL_TOAST_SERVICE, GOVERNED_COLOR_PALETTE_OPTIONS, GenericCrudService, GlobalActionService, GlobalConfigService, GovernedColorPaletteService, INLINE_FILTER_ALIAS_TOKENS, INLINE_FILTER_CONTROL_TYPES, INLINE_FILTER_CONTROL_TYPE_SET, INLINE_FILTER_CONTROL_TYPE_VALUES, INLINE_FILTER_TOKEN_TO_BASE_CONTROL_TYPE, INLINE_FILTER_TOKEN_TO_CONTROL_TYPE, IconPickerService, IconPosition, IconSize, LOGGER_LEVEL_BY_ENV, LOGGER_LEVEL_PRIORITY, LoadingOrchestrator, LocalConnectionStorage, LocalStorageAsyncAdapter, LocalStorageCacheAdapter, LocalStorageConfigService, LoggerService, LoggerThrottleTracker, LoggerWarnOnceTracker, MemoryCacheAdapter, NestedPortCatalogService, NestedWidgetConfigAccessor, NumericFormat, OVERLAY_DECIDER_DEBUG, OVERLAY_DECISION_MATRIX, ObservabilityDashboardService, OverlayDeciderService, PRAXIS_ACTION_CONTROL_DEFAULTS, PRAXIS_ACTION_CONTROL_VARS, PRAXIS_COLLECTION_EXPORT_HTTP_OPTIONS, PRAXIS_COLLECTION_EXPORT_PROVIDER, PRAXIS_COLLECTION_SEARCH_DEFAULTS, PRAXIS_COLLECTION_SEARCH_VARS, PRAXIS_CORPORATE_SENSITIVE_KEYS, PRAXIS_DEFAULT_EXPORT_SECURITY_POLICY, PRAXIS_DEFAULT_OBSERVABILITY_ALERT_RULES, PRAXIS_DYNAMIC_PAGE_COMPONENT_METADATA, PRAXIS_EFFECTIVE_UI_LAYOUT_OPTIONS, PRAXIS_ENTERPRISE_RUNTIME_CONTEXT_OPTIONS, PRAXIS_ENTERPRISE_RUNTIME_CONTEXT_READY, PRAXIS_EXPORT_FORMULA_PREFIXES, PRAXIS_EXPORT_SECURITY_POLICY, PRAXIS_FOOTER_LINKS_METADATA, PRAXIS_GLOBAL_ACTION_CATALOG, PRAXIS_GLOBAL_CONFIG_BOOTSTRAP_OPTIONS, PRAXIS_GLOBAL_CONFIG_BOOTSTRAP_READY, PRAXIS_GLOBAL_CONFIG_TENANT_RESOLVER, PRAXIS_HERO_BANNER_METADATA, PRAXIS_I18N_CONFIG, PRAXIS_I18N_TRANSLATOR, PRAXIS_JSON_LOGIC_OPERATORS, PRAXIS_LAYER_SCALE_DEFAULTS, PRAXIS_LAYER_SCALE_VARS, PRAXIS_LEGAL_NOTICE_METADATA, PRAXIS_LOADING_CTX, PRAXIS_LOADING_RENDERER, PRAXIS_LOGGER_CONFIG, PRAXIS_LOGGER_SINKS, PRAXIS_OBSERVABILITY_DASHBOARD_OPTIONS, PRAXIS_QUERY_FILTER_EXPRESSION_SCHEMA_VERSION, PRAXIS_RELATED_RESOURCE_OUTLET_AUTHORING_MANIFEST, PRAXIS_RELATED_RESOURCE_OUTLET_COMPONENT_METADATA, PRAXIS_RELATED_RESOURCE_OUTLET_PORTS, PRAXIS_RICH_TEXT_BLOCK_METADATA, PRAXIS_TABLE_DETAIL_INLINE_NODE_RESOLVERS, PRAXIS_TABLE_DETAIL_INLINE_RENDERERS, PRAXIS_TABLE_DETAIL_RESOURCE_RESOLVER, PRAXIS_TELEMETRY_TRANSPORT, PRAXIS_THEME_SURFACE_DEFAULTS, PRAXIS_THEME_SURFACE_VARS, PRAXIS_USER_CONTEXT_SUMMARY_METADATA, PRIVACY_CONSENT_EDITORIAL_SOLUTION, PRIVACY_CONSENT_EDITORIAL_TEMPLATE, PraxisAppShellComponent, PraxisBulkClientService, PraxisCollectionExportService, PraxisCore, PraxisCustomizationModeService, PraxisFooterLinksComponent, PraxisGlobalErrorHandler, PraxisHeroBannerComponent, PraxisHttpCollectionExportProvider, PraxisI18nService, PraxisIconButtonComponent, PraxisIconDirective, PraxisIconPickerComponent, PraxisJsonLogicError, PraxisJsonLogicService, PraxisKeepAliveTabDirective, PraxisLayerScaleStyleService, PraxisLegalNoticeComponent, PraxisLoadingInterceptor, PraxisRelatedResourceOutletComponent, PraxisRelatedResourceOutletConfigEditorComponent, PraxisResourceIdentityComponent, PraxisRichTextBlockComponent, PraxisRuntimeComponentObservationRegistryService, PraxisSurfaceHostComponent, PraxisUserContextSummaryComponent, PraxisWidgetEventBus, RESOURCE_DISCOVERY_I18N_CONFIG, RESOURCE_DISCOVERY_I18N_NAMESPACE, RULE_PROPERTY_SCHEMA, RelatedResourceSurfaceResolverService, RemoteConfigStorage, ResourceActionOpenAdapterService, ResourceDiscoveryService, ResourceQuickConnectComponent, ResourceRecordOpenError, ResourceRecordOpenService, ResourceSurfaceOpenAdapterService, SCHEMA_METADATA_CLIENT_OPTIONS, SCHEMA_VIEWER_CONTEXT, SETTINGS_EDITOR_SECTIONS_HOSTED, SETTINGS_PANEL_BRIDGE, SETTINGS_PANEL_DATA, STEPPER_CONFIG_EDITOR, SURFACE_DRAWER_BRIDGE, SURFACE_DRAWER_CONTENT_DATA, SURFACE_DRAWER_REF, SURFACE_NAVIGATION_I18N_CONFIG, SURFACE_NAVIGATION_I18N_NAMESPACE, SURFACE_OPEN_I18N_CONFIG, SURFACE_OPEN_I18N_NAMESPACE, SURFACE_OPEN_PRESETS, SafeExpressionEvaluator, SchemaMetadataClient, SchemaNormalizerService, SchemaViewerComponent, SettingsSectionTabsComponent, SurfaceBindingRuntimeService, SurfaceNavigationError, SurfaceOpenActionEditorComponent, SurfaceOpenMaterializerService, SurfaceOutletRegistryService, TABLE_CONFIG_EDITOR, TableConfigService, TelemetryLoggerSink, TelemetryService, UiLayoutLifecycleContractError, UiLayoutLifecycleHttpError, UiLayoutLifecycleService, ValidationPattern, WidgetPageCompositionFactory, WidgetPageDataSourceRuntimeService, WidgetPageStateRuntimeService, WidgetShellComponent, applyDeclarativeValuePipe, applyLocalCustomizations$2 as applyLocalCustomizations, applyLocalCustomizations$1 as applyLocalFormCustomizations, assertPraxisCollectionExportArtifact, assertPraxisRuntimeComponentObservationSerializable, buildAngularValidators, buildApiUrl, buildBaseColumnFromDef, buildBaseFormField, buildFormConfigFromEditorialTemplate, buildHeaders, buildPageKey, buildPraxisActionControlCss, buildPraxisCollectionSearchCss, buildPraxisEffectDistinctKey, buildPraxisLayerScaleCss, buildPraxisThemeSurfaceCss, buildSchemaId, buildSchemaIdStorageKeySegment, buildValidatorsFromValidatorOptions, cancelIfCpfInvalidHook, canonicalJsonSha256, canonicalJsonStringify, clampRange, classifyEntityLookupResult, clonePraxisRuntimeComponentObservation, cloneTableConfig, cloneUiLayoutJsonDocument, cnpjAlphaValidator, collapseWhitespace, composeHeadersWithVersion, conditionalAsyncValidator, convertFormLayoutToConfig, createCorporateLoggerConfig, createCorporateObservabilityOptions, createCpfCnpjValidator, createDefaultFormConfig, createDefaultTableConfig, createDynamicRecord, createEmptyFormConfig, createEmptyRichContentDocument, createFieldLayoutItem, createPersistedPage, customAsyncValidatorFn, customValidatorFn, debounceAsyncValidator, deepMerge, domainKnowledgeTimelineToRichContentDocument, domainRuleTimelineToRichContentDocument, ensureIds, ensureNoConflictsHookFactory, ensurePageIds, escapePraxisExportCell, evaluateFieldAccess, extractNormalizedError, extractRecordId, fetchWithETag, fileTypeValidator, fillUndefined, findBuiltinWidgetShellPreset, formIdentityIssues, generateBulkIdempotencyKey, generateId, getDefaultFormHints, getEditorialCompliancePresetById, getEditorialFormTemplateById, getEditorialFormTemplateCatalog, getEditorialSolutionById, getEditorialSolutionCatalog, getEditorialSolutionPresetById, getEditorialThemePresetById, getEssentialConfig, getFieldMetadataCapabilities, getFormColumnFieldNames, getFormLayoutFieldNames, getGlobalActionCatalog, getGlobalActionPayloadActualType, getGlobalActionPayloadTypeIssue, getGlobalActionProviderEvidence, getGlobalActionUiSchema, getMissingGlobalActionPayloadKeys, getPraxisTableCellVisualizationConstraint, getPraxisTableCellVisualizationGuidance, getReferencedFieldMetadata, getRequiredGlobalActionPayloadKeys, getTextTransformer, getWidgetShellActionIdError, hasMeaningfulGlobalActionPayloadValue, hasPraxisCollectionExportArtifact, interpolatePraxisTranslation, isAllowedEditorialContentFormat, isAllowedEditorialHref, isBulkExecutionTerminal, isCssTextTransform, isDomainRuleSnapshotProblemResponse, isDynamicDataRecord, isEditorialComponentMeta, isEntityLookupMultiplePayloadMode, isEntityLookupPayloadMode, isEntityLookupPayloadModeCompatible, isEntityLookupResultSelectable, isEntityLookupSinglePayloadMode, isFormLayoutItem, isGlobalActionProviderOperational, isGlobalActionRef, isInlineFilterControlType, isLookupDialogSize, isLookupFilterFieldType, isLookupFilterOperator, isPraxisI18nMessageDescriptor, isPraxisPresentationVisualizationTableSafe, isPraxisRuntimeGlobalActionEffect, isProgrammaticDateRangePreset, isRangeValidForFilter, isRequiredGlobalActionParamPayloadMissing, isRequiredGlobalActionPayloadMissing, isStaticDateRangePreset, isSurfaceNavigationError, isTableConfigV2, isUnresolvedTemplateToken, isValidFormConfig, isValidTableConfig, legacyCnpjValidator, legacyCpfValidator, logOnErrorHook, mapFieldDefinitionToMetadata, mapFieldDefinitionsToMetadata, markGlobalActionProviderOperational, matchFieldValidator, materializeFormLayoutFromMetadata, materializeGovernedPaletteColors, materializeGovernedPaletteEntries, materializeResourceIdentity, maxFileSizeValidator, mergeFieldMetadata, mergePraxisI18nConfigs, mergeTableConfigs, migrateFormLayoutRule, migrateLegacyCompositionLink, migrateLegacyCompositionLinks, minWordsValidator, nestedPortPathIdentity, normalizeCardMediaAspectRatio, normalizeControlTypeKey, normalizeControlTypeToken, normalizeEditorialLink, normalizeEnd, normalizeFieldAccessMetadata, normalizeFieldConstraints, normalizeFieldPresentation, normalizeFormConfig, normalizeFormLayoutItems, normalizeFormMetadata, normalizeGlobalActionRef$1 as normalizeGlobalActionRef, normalizeLayoutPolicy, normalizeLookupFilterRequest, normalizePath, normalizePraxisDataQueryContext, normalizePraxisEffectPolicy, normalizePraxisPresentationVisualization, normalizePraxisQueryFilterExpression, normalizePraxisQueryFilterNode, normalizeReactiveDeterminations, normalizeResourceAvailabilityReasonCode, normalizeResourceIdentityContract, normalizeStart, normalizeSurfaceOperationContext, normalizeUnknownError, normalizeWidgetEventPath, notifySuccessHook, parseJsonResponseOrEmpty, praxisLoadingInterceptorFn, prefillFromContextHook, prepareCanvasArrangement, projectComponentAuthoringManifest, projectGroupedCommandPartialRows, provideDefaultFormHooks, provideFieldSelectorRegistryBase, provideFieldSelectorRegistryOverride, provideFieldSelectorRegistryRuntime, provideFormHookPresets, provideFormHooks, provideGlobalActionCatalog, provideGlobalActionHandler, provideGlobalConfig, provideGlobalConfigReady, provideGlobalConfigSeed, provideGlobalConfigTenant, provideHookResolvers, provideHookWhitelist, provideOverlayDecisionMatrix, providePraxisAnalyticsGlobalActions, providePraxisCollectionExportProvider, providePraxisDynamicPageMetadata, providePraxisEnterpriseRuntimeContext, providePraxisFooterLinksMetadata, providePraxisGlobalActionCatalog, providePraxisGlobalActions, providePraxisGlobalConfigBootstrap, providePraxisHeroBannerMetadata, providePraxisHttpCollectionExportProvider, providePraxisHttpLoading, providePraxisI18n, providePraxisI18nConfig, providePraxisI18nTranslator, providePraxisIconDefaults, providePraxisJsonLogicOperator, providePraxisJsonLogicOperatorOverride, providePraxisLegalNoticeMetadata, providePraxisLoadingDefaults, providePraxisLogging, providePraxisRelatedResourceOutletMetadata, providePraxisRichTextBlockMetadata, providePraxisTelemetry, providePraxisToastGlobalActions, providePraxisUserContextSummaryMetadata, provideRemoteGlobalConfig, readPraxisExportValue, readStrongResourceEtag, reconcileFilterConfig, reconcileFormConfig, reconcileTableConfig, registerPraxisRuntimeComponentObservation, removeDiacritics, renderPraxisPresentationVisualizationHtml, reportTelemetryHookFactory, requiredCheckedValidator, requiredPresenceValidator, resolveBuiltinPresets, resolveBuiltinWidgetShellAppearance, resolveColumnTypeFromFieldDefinition, resolveControlTypeAlias, resolveDataField, resolveDateRangeShortcutPreset, resolveDateRangeShortcutPresets, resolveDefaultValuePresentationFormat, resolveEntityLookupPayloadMode, resolveFieldPresentation, resolveGroupedCommandPartialRowSpans, resolveHidden, resolveInlineFilterControlType, resolveInlineFilterControlTypeToBaseControlType, resolveLoggerConfig, resolveObservabilityOptions, resolveOffset, resolveOrder, resolvePraxisCollectionExportItems, resolvePraxisExportFields, resolvePraxisExportScope, resolvePraxisFilterCriteria, resolvePraxisI18nDocument, resolvePraxisMicroVisualizationTone, resolveResourceAvailabilityReasonKey, resolveResourceIdentityContract, resolveSpan, resolveTextMaskFormat, resolveTextMaskFormatFromFieldDefinition, resolveValuePresentation, resolveValuePresentationLocale, resolveWidgetPageLayoutPreset, serializeEntityLookupValueForPayload, serializeOptionSourceFilterRequest, serializePraxisCollectionToCsv, serializePraxisCollectionToExcel, serializePraxisCollectionToJson, slugify, staticDateRangePresetToPreset, stripMasksHook, supportsConfigDocuments, supportsImplicitValuePresentation, syncWithServerMetadata, textSha256, toCamel, toCapitalize, toKebab, toPascal, toSentenceCase, toSnake, toTitleCase, translateResourceAvailabilityReason, translateResourceDiscoveryText, translateSurfaceNavigationRejected, translateSurfaceOpenFailed, translateUnavailableWorkflowMessage, trim, uiLayoutJsonIdentity, uniqueAsyncValidator, urlValidator, validateCanvasArrangement, validateGlobalActionRef, validateGlobalActionRefs, withFormConfigSections, withMessage, withPraxisHttpLoading };
64138
+ export { API_CONFIG_STORAGE_OPTIONS, API_URL, ASYNC_CONFIG_STORAGE, AllowedFileTypes, AnalyticsPresentationResolver, AnalyticsSchemaContractService, AnalyticsStatsRequestBuilderService, ApiConfigStorage, ApiEndpoint, BUILTIN_PAGE_LAYOUT_PRESETS, BUILTIN_PAGE_THEME_PRESETS, BUILTIN_SHELL_PRESETS, BUILTIN_WIDGET_SHELL_PRESETS, BulkOperationClientService, BulkSyncSession, BulkSyncStateService, COMPONENT_METADATA_REGISTRY_I18N_CONFIG, COMPONENT_METADATA_REGISTRY_I18N_NAMESPACE, CONFIG_STORAGE, CONNECTION_STORAGE, ComponentAuthoringManifestProjectionError, ComponentKeyService, ComponentMetadataRegistry, ComponentRuntimeProfileService, CompositionRuntimeFacade, CompositionValidatorService, ConsoleLoggerSink, CrudOperationResolutionService, DEFAULT_DYNAMIC_FORM_SCHEMA_CACHE_MAX_ENTRIES, DEFAULT_DYNAMIC_FORM_SCHEMA_CACHE_TTL_MS, DEFAULT_FIELD_SELECTOR_CONTROL_TYPE_MAP, DEFAULT_JSON_LOGIC_OPERATORS, DEFAULT_SCHEMA_REQUEST_TIMEOUT_MS, DEFAULT_TABLE_CONFIG, DOMAIN_CATALOG_COMPONENT_CONTEXT_PACK, DOMAIN_CATALOG_CONTEXT_HINT_SCHEMA_VERSION, DYNAMIC_PAGE_AI_CAPABILITIES, DYNAMIC_PAGE_COMPONENT_CONTEXT_PACK, DYNAMIC_PAGE_CONFIG_EDITOR, DYNAMIC_PAGE_SHELL_EDITOR, DefaultLoadingRenderer, DeferredAsyncConfigStorage, DomainCatalogService, DomainKnowledgeService, DomainRuleService, DynamicFormService, DynamicWidgetLoaderDirective, DynamicWidgetPageComponent, EDITORIAL_ALLOWED_CONTENT_FORMATS, EDITORIAL_COMPLIANCE_PRESETS, EDITORIAL_EXTERNAL_LINK_REL, EDITORIAL_FORM_TEMPLATE_CATALOG, EDITORIAL_HTML_ENABLED, EDITORIAL_MARKDOWN_IMAGES_ENABLED, EDITORIAL_SOLUTION_CATALOG, EDITORIAL_SOLUTION_PRESETS, EDITORIAL_THEME_PRESETS, EDITORIAL_WIDGET_CONVENTION_INPUTS, EDITORIAL_WIDGET_TAG, EFFECTIVE_UI_LAYOUT_COMPOSITION_SCHEMA_VERSION, EMPLOYEE_ONBOARDING_EDITORIAL_SOLUTION, EMPLOYEE_ONBOARDING_EDITORIAL_TEMPLATE, EMPLOYEE_ONBOARDING_GUIDED_EDITORIAL_SOLUTION, EMPLOYEE_ONBOARDING_GUIDED_EDITORIAL_TEMPLATE, EVENT_REGISTRATION_EDITORIAL_SOLUTION, EVENT_REGISTRATION_EDITORIAL_TEMPLATE, EffectiveUiLayoutContractError, EffectiveUiLayoutHttpError, EffectiveUiLayoutService, EmptyStateCardComponent, EnterpriseRuntimeContextObsoleteError, EnterpriseRuntimeContextService, ErrorMessageService, FIELD_METADATA_CAPABILITIES, FIELD_SELECTOR_REGISTRY_BASE, FIELD_SELECTOR_REGISTRY_DISABLE_DEFAULTS, FIELD_SELECTOR_REGISTRY_OVERRIDES, FORM_HOOKS, FORM_HOOKS_PRESETS, FORM_HOOKS_WHITELIST, FORM_HOOK_RESOLVERS, FieldControlType, FieldDataType, FieldSelectorRegistry, FormHooksRegistry, GLOBAL_ACTION_CATALOG, GLOBAL_ACTION_HANDLERS, GLOBAL_ACTION_UI_SCHEMAS, GLOBAL_ANALYTICS_SERVICE, GLOBAL_API_CLIENT, GLOBAL_CONFIG, GLOBAL_DIALOG_SERVICE, GLOBAL_ROUTE_GUARD_RESOLVER, GLOBAL_SURFACE_SERVICE, GLOBAL_TOAST_SERVICE, GOVERNED_COLOR_PALETTE_OPTIONS, GenericCrudService, GlobalActionService, GlobalConfigService, GovernedColorPaletteService, INLINE_FILTER_ALIAS_TOKENS, INLINE_FILTER_CONTROL_TYPES, INLINE_FILTER_CONTROL_TYPE_SET, INLINE_FILTER_CONTROL_TYPE_VALUES, INLINE_FILTER_TOKEN_TO_BASE_CONTROL_TYPE, INLINE_FILTER_TOKEN_TO_CONTROL_TYPE, IconPickerService, IconPosition, IconSize, LOGGER_LEVEL_BY_ENV, LOGGER_LEVEL_PRIORITY, LoadingOrchestrator, LocalConnectionStorage, LocalStorageAsyncAdapter, LocalStorageCacheAdapter, LocalStorageConfigService, LoggerService, LoggerThrottleTracker, LoggerWarnOnceTracker, MemoryCacheAdapter, NestedPortCatalogService, NestedWidgetConfigAccessor, NumericFormat, OVERLAY_DECIDER_DEBUG, OVERLAY_DECISION_MATRIX, ObservabilityDashboardService, OverlayDeciderService, PRAXIS_ACTION_CONTROL_DEFAULTS, PRAXIS_ACTION_CONTROL_VARS, PRAXIS_COLLECTION_EXPORT_HTTP_OPTIONS, PRAXIS_COLLECTION_EXPORT_PROVIDER, PRAXIS_COLLECTION_SEARCH_DEFAULTS, PRAXIS_COLLECTION_SEARCH_VARS, PRAXIS_CORPORATE_SENSITIVE_KEYS, PRAXIS_DEFAULT_EXPORT_SECURITY_POLICY, PRAXIS_DEFAULT_OBSERVABILITY_ALERT_RULES, PRAXIS_DYNAMIC_PAGE_COMPONENT_METADATA, PRAXIS_EFFECTIVE_UI_LAYOUT_OPTIONS, PRAXIS_ENTERPRISE_RUNTIME_CONTEXT_OPTIONS, PRAXIS_ENTERPRISE_RUNTIME_CONTEXT_READY, PRAXIS_EXPORT_FORMULA_PREFIXES, PRAXIS_EXPORT_SECURITY_POLICY, PRAXIS_FOOTER_LINKS_METADATA, PRAXIS_GLOBAL_ACTION_CATALOG, PRAXIS_GLOBAL_CONFIG_BOOTSTRAP_OPTIONS, PRAXIS_GLOBAL_CONFIG_BOOTSTRAP_READY, PRAXIS_GLOBAL_CONFIG_TENANT_RESOLVER, PRAXIS_HERO_BANNER_METADATA, PRAXIS_I18N_CONFIG, PRAXIS_I18N_TRANSLATOR, PRAXIS_JSON_LOGIC_OPERATORS, PRAXIS_LAYER_SCALE_DEFAULTS, PRAXIS_LAYER_SCALE_VARS, PRAXIS_LEGAL_NOTICE_METADATA, PRAXIS_LOADING_CTX, PRAXIS_LOADING_RENDERER, PRAXIS_LOGGER_CONFIG, PRAXIS_LOGGER_SINKS, PRAXIS_OBSERVABILITY_DASHBOARD_OPTIONS, PRAXIS_QUERY_FILTER_EXPRESSION_SCHEMA_VERSION, PRAXIS_RELATED_RESOURCE_OUTLET_AUTHORING_MANIFEST, PRAXIS_RELATED_RESOURCE_OUTLET_COMPONENT_METADATA, PRAXIS_RELATED_RESOURCE_OUTLET_PORTS, PRAXIS_RICH_TEXT_BLOCK_METADATA, PRAXIS_TABLE_DETAIL_INLINE_NODE_RESOLVERS, PRAXIS_TABLE_DETAIL_INLINE_RENDERERS, PRAXIS_TABLE_DETAIL_RESOURCE_RESOLVER, PRAXIS_TELEMETRY_TRANSPORT, PRAXIS_THEME_SURFACE_DEFAULTS, PRAXIS_THEME_SURFACE_VARS, PRAXIS_USER_CONTEXT_SUMMARY_METADATA, PRIVACY_CONSENT_EDITORIAL_SOLUTION, PRIVACY_CONSENT_EDITORIAL_TEMPLATE, PraxisAppShellComponent, PraxisBulkClientService, PraxisCollectionExportService, PraxisCore, PraxisCustomizationModeService, PraxisFooterLinksComponent, PraxisGlobalErrorHandler, PraxisHeroBannerComponent, PraxisHttpCollectionExportProvider, PraxisI18nService, PraxisIconButtonComponent, PraxisIconDirective, PraxisIconPickerComponent, PraxisJsonLogicError, PraxisJsonLogicService, PraxisKeepAliveTabDirective, PraxisLayerScaleStyleService, PraxisLegalNoticeComponent, PraxisLoadingInterceptor, PraxisRelatedResourceOutletComponent, PraxisRelatedResourceOutletConfigEditorComponent, PraxisResourceIdentityComponent, PraxisRichTextBlockComponent, PraxisRuntimeComponentObservationRegistryService, PraxisSurfaceHostComponent, PraxisUserContextSummaryComponent, PraxisWidgetEventBus, RESOURCE_DISCOVERY_I18N_CONFIG, RESOURCE_DISCOVERY_I18N_NAMESPACE, RULE_PROPERTY_SCHEMA, RelatedResourceSurfaceResolverService, RemoteConfigStorage, ResourceActionOpenAdapterService, ResourceDiscoveryService, ResourceQuickConnectComponent, ResourceRecordOpenError, ResourceRecordOpenService, ResourceSurfaceOpenAdapterService, SCHEMA_METADATA_CLIENT_OPTIONS, SCHEMA_VIEWER_CONTEXT, SETTINGS_EDITOR_SECTIONS_HOSTED, SETTINGS_PANEL_BRIDGE, SETTINGS_PANEL_DATA, STEPPER_CONFIG_EDITOR, SURFACE_DRAWER_BRIDGE, SURFACE_DRAWER_CONTENT_DATA, SURFACE_DRAWER_REF, SURFACE_NAVIGATION_I18N_CONFIG, SURFACE_NAVIGATION_I18N_NAMESPACE, SURFACE_OPEN_I18N_CONFIG, SURFACE_OPEN_I18N_NAMESPACE, SURFACE_OPEN_PRESETS, SafeExpressionEvaluator, SchemaMetadataClient, SchemaNormalizerService, SchemaViewerComponent, SettingsSectionTabsComponent, SurfaceBindingRuntimeService, SurfaceNavigationError, SurfaceOpenActionEditorComponent, SurfaceOpenMaterializerService, SurfaceOutletRegistryService, TABLE_CONFIG_EDITOR, TableConfigService, TelemetryLoggerSink, TelemetryService, UiLayoutLifecycleContractError, UiLayoutLifecycleHttpError, UiLayoutLifecycleService, ValidationPattern, WidgetPageCompositionFactory, WidgetPageDataSourceRuntimeService, WidgetPageStateRuntimeService, WidgetShellComponent, applyDeclarativeValuePipe, applyLocalCustomizations$2 as applyLocalCustomizations, applyLocalCustomizations$1 as applyLocalFormCustomizations, assertPraxisCollectionExportArtifact, assertPraxisRuntimeComponentObservationSerializable, buildAngularValidators, buildApiUrl, buildBaseColumnFromDef, buildBaseFormField, buildFormConfigFromEditorialTemplate, buildHeaders, buildPageKey, buildPraxisActionControlCss, buildPraxisCollectionSearchCss, buildPraxisEffectDistinctKey, buildPraxisLayerScaleCss, buildPraxisThemeSurfaceCss, buildPublishedPageIdentity, buildSchemaId, buildSchemaIdStorageKeySegment, buildValidatorsFromValidatorOptions, calibrateFieldMetadataFromSemantics, canOrganizeFormLayoutBySemantics, cancelIfCpfInvalidHook, canonicalJsonSha256, canonicalJsonStringify, clampRange, classifyEntityLookupResult, cloneBoundedUiLayoutJsonDocument, clonePraxisRuntimeComponentObservation, cloneTableConfig, cloneUiLayoutJsonDocument, cnpjAlphaValidator, collapseWhitespace, composeHeadersWithVersion, conditionalAsyncValidator, convertFormLayoutToConfig, copyPageAuthoringDocument, createCorporateLoggerConfig, createCorporateObservabilityOptions, createCpfCnpjValidator, createDefaultFormConfig, createDefaultTableConfig, createDynamicRecord, createEmptyFormConfig, createEmptyRichContentDocument, createFieldLayoutItem, createPersistedPage, customAsyncValidatorFn, customValidatorFn, debounceAsyncValidator, decodePageAuthoringDocument, deepMerge, derivePageChildRuntimeId, domainKnowledgeTimelineToRichContentDocument, domainRuleTimelineToRichContentDocument, encodePageAuthoringDocument, ensureIds, ensureNoConflictsHookFactory, ensurePageIds, escapePraxisExportCell, evaluateFieldAccess, extractNormalizedError, extractRecordId, fetchWithETag, fileTypeValidator, fillUndefined, findBuiltinWidgetShellPreset, formIdentityIssues, generateBulkIdempotencyKey, generateId, getDefaultFormHints, getEditorialCompliancePresetById, getEditorialFormTemplateById, getEditorialFormTemplateCatalog, getEditorialSolutionById, getEditorialSolutionCatalog, getEditorialSolutionPresetById, getEditorialThemePresetById, getEssentialConfig, getFieldMetadataCapabilities, getFormColumnFieldNames, getFormLayoutFieldNames, getGlobalActionCatalog, getGlobalActionPayloadActualType, getGlobalActionPayloadTypeIssue, getGlobalActionProviderEvidence, getGlobalActionUiSchema, getMissingGlobalActionPayloadKeys, getPraxisTableCellVisualizationConstraint, getPraxisTableCellVisualizationGuidance, getReferencedFieldMetadata, getRequiredGlobalActionPayloadKeys, getTextTransformer, getWidgetShellActionIdError, hasMeaningfulGlobalActionPayloadValue, hasPraxisCollectionExportArtifact, hasSemanticFieldCalibrationDiff, humanizeCatalogFieldName, inferDomainSemanticHexColor, inferDomainSemanticIcon, inferDomainSemanticTone, inferSemanticFieldControlType, inferSemanticFieldGroup, inferSemanticFieldWidth, interpolatePraxisTranslation, isAllowedEditorialContentFormat, isAllowedEditorialHref, isBulkExecutionTerminal, isCssTextTransform, isDomainRuleSnapshotProblemResponse, isDynamicDataRecord, isEditorialComponentMeta, isEntityLookupMultiplePayloadMode, isEntityLookupPayloadMode, isEntityLookupPayloadModeCompatible, isEntityLookupResultSelectable, isEntityLookupSinglePayloadMode, isFormLayoutItem, isGlobalActionProviderOperational, isGlobalActionRef, isInlineFilterControlType, isLookupDialogSize, isLookupFilterFieldType, isLookupFilterOperator, isPraxisI18nMessageDescriptor, isPraxisPresentationVisualizationTableSafe, isPraxisRuntimeGlobalActionEffect, isProgrammaticDateRangePreset, isRangeValidForFilter, isRequiredGlobalActionParamPayloadMissing, isRequiredGlobalActionPayloadMissing, isStaticDateRangePreset, isSurfaceNavigationError, isTableConfigV2, isUnresolvedTemplateToken, isValidFormConfig, isValidTableConfig, legacyCnpjValidator, legacyCpfValidator, logOnErrorHook, mapCatalogFieldsToMetadata, mapFieldDefinitionToMetadata, mapFieldDefinitionsToMetadata, markGlobalActionProviderOperational, matchFieldValidator, materializeFormLayoutFromMetadata, materializeGovernedPaletteColors, materializeGovernedPaletteEntries, materializeResourceIdentity, maxFileSizeValidator, mergeFieldMetadata, mergePraxisI18nConfigs, mergeTableConfigs, migrateFormLayoutRule, migrateLegacyCompositionLink, migrateLegacyCompositionLinks, minWordsValidator, nestedPortPathIdentity, normalizeCardMediaAspectRatio, normalizeControlTypeKey, normalizeControlTypeToken, normalizeEditorialLink, normalizeEnd, normalizeFieldAccessMetadata, normalizeFieldConstraints, normalizeFieldPresentation, normalizeFormConfig, normalizeFormLayoutItems, normalizeFormMetadata, normalizeGlobalActionRef$1 as normalizeGlobalActionRef, normalizeLayoutPolicy, normalizeLookupFilterRequest, normalizePath, normalizePraxisDataQueryContext, normalizePraxisEffectPolicy, normalizePraxisIconLigature, normalizePraxisPresentationVisualization, normalizePraxisQueryFilterExpression, normalizePraxisQueryFilterNode, normalizeReactiveDeterminations, normalizeResourceAvailabilityReasonCode, normalizeResourceIdentityContract, normalizeStart, normalizeSurfaceOperationContext, normalizeUnknownError, normalizeWidgetEventPath, notifySuccessHook, organizeFormLayoutBySemantics, parseJsonResponseOrEmpty, praxisLoadingInterceptorFn, prefillFromContextHook, prepareCanvasArrangement, projectComponentAuthoringManifest, projectGroupedCommandPartialRows, provideDefaultFormHooks, provideFieldSelectorRegistryBase, provideFieldSelectorRegistryOverride, provideFieldSelectorRegistryRuntime, provideFormHookPresets, provideFormHooks, provideGlobalActionCatalog, provideGlobalActionHandler, provideGlobalConfig, provideGlobalConfigReady, provideGlobalConfigSeed, provideGlobalConfigTenant, provideHookResolvers, provideHookWhitelist, provideOverlayDecisionMatrix, providePraxisAnalyticsGlobalActions, providePraxisCollectionExportProvider, providePraxisDynamicPageMetadata, providePraxisEnterpriseRuntimeContext, providePraxisFooterLinksMetadata, providePraxisGlobalActionCatalog, providePraxisGlobalActions, providePraxisGlobalConfigBootstrap, providePraxisHeroBannerMetadata, providePraxisHttpCollectionExportProvider, providePraxisHttpLoading, providePraxisI18n, providePraxisI18nConfig, providePraxisI18nTranslator, providePraxisIconDefaults, providePraxisJsonLogicOperator, providePraxisJsonLogicOperatorOverride, providePraxisLegalNoticeMetadata, providePraxisLoadingDefaults, providePraxisLogging, providePraxisRelatedResourceOutletMetadata, providePraxisRichTextBlockMetadata, providePraxisTelemetry, providePraxisToastGlobalActions, providePraxisUserContextSummaryMetadata, provideRemoteGlobalConfig, readPraxisExportValue, readStrongResourceEtag, reconcileFilterConfig, reconcileFormConfig, reconcileTableConfig, registerPraxisRuntimeComponentObservation, removeDiacritics, renderPraxisPresentationVisualizationHtml, reportTelemetryHookFactory, requiredCheckedValidator, requiredPresenceValidator, resolveBuiltinPresets, resolveBuiltinWidgetShellAppearance, resolveColumnTypeFromFieldDefinition, resolveControlTypeAlias, resolveDataField, resolveDateRangeShortcutPreset, resolveDateRangeShortcutPresets, resolveDefaultValuePresentationFormat, resolveEntityLookupPayloadMode, resolveFieldPresentation, resolveGroupedCommandPartialRowSpans, resolveHidden, resolveInlineFilterControlType, resolveInlineFilterControlTypeToBaseControlType, resolveLoggerConfig, resolveObservabilityOptions, resolveOffset, resolveOrder, resolvePraxisCollectionExportItems, resolvePraxisExportFields, resolvePraxisExportScope, resolvePraxisFilterCriteria, resolvePraxisI18nDocument, resolvePraxisMicroVisualizationTone, resolveResourceAvailabilityReasonKey, resolveResourceIdentityContract, resolveSpan, resolveTextMaskFormat, resolveTextMaskFormatFromFieldDefinition, resolveValuePresentation, resolveValuePresentationLocale, resolveWidgetPageLayoutPreset, serializeEntityLookupValueForPayload, serializeOptionSourceFilterRequest, serializePraxisCollectionToCsv, serializePraxisCollectionToExcel, serializePraxisCollectionToJson, slugify, staticDateRangePresetToPreset, stripMasksHook, supportsConfigDocuments, supportsImplicitValuePresentation, syncWithServerMetadata, textSha256, toCamel, toCapitalize, toKebab, toPascal, toSentenceCase, toSnake, toTitleCase, translateResourceAvailabilityReason, translateResourceDiscoveryText, translateSurfaceNavigationRejected, translateSurfaceOpenFailed, translateUnavailableWorkflowMessage, trim, uiLayoutJsonIdentity, uniqueAsyncValidator, urlValidator, validateCanvasArrangement, validateGlobalActionRef, validateGlobalActionRefs, validatePageAuthoringDocument, withFormConfigSections, withMessage, withPraxisHttpLoading };