@praxisui/core 10.0.0-rc.55 → 10.0.0-rc.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/component-registry.json +2 -2
- package/fesm2022/praxisui-core-schema.mjs +158 -34
- package/fesm2022/praxisui-core.mjs +1733 -267
- package/package.json +1 -1
- package/types/praxisui-core-schema.d.ts +4 -0
- package/types/praxisui-core.d.ts +194 -13
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"generatedAt": "2026-11-19T19:36:26.164Z",
|
|
4
4
|
"packageName": "@praxisui/core",
|
|
5
|
-
"packageVersion": "10.0.0-rc.
|
|
5
|
+
"packageVersion": "10.0.0-rc.57",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 4,
|
|
@@ -257,12 +257,38 @@ function getPraxisStackedBarPaintStyle(segment, fallbackTone = 'neutral') {
|
|
|
257
257
|
color: paint,
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
|
+
function isVisualizationEntrySuppressed(entry) {
|
|
261
|
+
if (!entry || typeof entry !== 'object') {
|
|
262
|
+
return false;
|
|
263
|
+
}
|
|
264
|
+
const obj = entry;
|
|
265
|
+
return (obj.suppressed === true
|
|
266
|
+
|| obj.privacySuppressed === true
|
|
267
|
+
|| (obj.value === null && obj.state === 'suppressed'));
|
|
268
|
+
}
|
|
269
|
+
function countSuppressedEntries(entries) {
|
|
270
|
+
if (!Array.isArray(entries)) {
|
|
271
|
+
return 0;
|
|
272
|
+
}
|
|
273
|
+
let count = 0;
|
|
274
|
+
for (const entry of entries) {
|
|
275
|
+
if (isVisualizationEntrySuppressed(entry)) {
|
|
276
|
+
count += 1;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
return count;
|
|
280
|
+
}
|
|
281
|
+
function resolvePreservedSuppressedCount(value) {
|
|
282
|
+
return typeof value === 'number' && Number.isFinite(value) && value > 0
|
|
283
|
+
? Math.trunc(value)
|
|
284
|
+
: 0;
|
|
285
|
+
}
|
|
260
286
|
function resolvePraxisStackedBarSegments(visualization) {
|
|
261
287
|
if (!visualization || visualization.kind !== 'stackedBar') {
|
|
262
288
|
return [];
|
|
263
289
|
}
|
|
264
290
|
if (Array.isArray(visualization.segments) && visualization.segments.length > 0) {
|
|
265
|
-
return visualization.segments.filter((seg) => !seg
|
|
291
|
+
return visualization.segments.filter((seg) => !isVisualizationEntrySuppressed(seg));
|
|
266
292
|
}
|
|
267
293
|
if (Array.isArray(visualization.items) && visualization.items.length > 0) {
|
|
268
294
|
const mapped = [];
|
|
@@ -274,7 +300,7 @@ function resolvePraxisStackedBarSegments(visualization) {
|
|
|
274
300
|
if (!item) {
|
|
275
301
|
return [];
|
|
276
302
|
}
|
|
277
|
-
if (
|
|
303
|
+
if (isVisualizationEntrySuppressed(item)) {
|
|
278
304
|
continue;
|
|
279
305
|
}
|
|
280
306
|
if (typeof item.value !== 'number' || !Number.isFinite(item.value) || item.value < 0) {
|
|
@@ -382,11 +408,7 @@ function normalizeStackedBarDistribution(value, surface) {
|
|
|
382
408
|
}
|
|
383
409
|
const parsedSegments = [];
|
|
384
410
|
const parsedItems = [];
|
|
385
|
-
const preservedSuppressedCount =
|
|
386
|
-
&& Number.isFinite(value.suppressedCount)
|
|
387
|
-
&& value.suppressedCount > 0
|
|
388
|
-
? Math.trunc(value.suppressedCount)
|
|
389
|
-
: 0;
|
|
411
|
+
const preservedSuppressedCount = resolvePreservedSuppressedCount(value.suppressedCount);
|
|
390
412
|
let suppressedCount = 0;
|
|
391
413
|
for (let i = 0; i < rawEntries.length; i++) {
|
|
392
414
|
if (!Object.prototype.hasOwnProperty.call(rawEntries, i)) {
|
|
@@ -415,8 +437,7 @@ function normalizeStackedBarDistribution(value, surface) {
|
|
|
415
437
|
};
|
|
416
438
|
}
|
|
417
439
|
const entryObj = rawEntry;
|
|
418
|
-
if (entryObj
|
|
419
|
-
|| (entryObj.value === null && entryObj.state === 'suppressed')) {
|
|
440
|
+
if (isVisualizationEntrySuppressed(entryObj)) {
|
|
420
441
|
suppressedCount += 1;
|
|
421
442
|
continue;
|
|
422
443
|
}
|
|
@@ -527,22 +548,23 @@ function normalizePraxisPresentationVisualization(value) {
|
|
|
527
548
|
const normalizedTargetLabel = normalizeText$1(value.targetLabel);
|
|
528
549
|
const thresholdsObj = normalizeThresholds(value.thresholds);
|
|
529
550
|
const isTableCell = surface === 'table-cell';
|
|
551
|
+
const normalizedPointsObj = normalizePoints(value.points);
|
|
530
552
|
let resolvedTone = tone;
|
|
531
553
|
let resolvedAriaLabel = ariaLabel;
|
|
532
554
|
if (!resolvedTone && thresholdsObj?.thresholds?.length) {
|
|
533
555
|
let evalVal = value.value;
|
|
534
|
-
if (evalVal === undefined &&
|
|
535
|
-
|
|
536
|
-
if (typeof last === 'number' && Number.isFinite(last)) {
|
|
537
|
-
evalVal = last;
|
|
538
|
-
}
|
|
539
|
-
else if (last && typeof last === 'object' && Number.isFinite(last.value)) {
|
|
540
|
-
evalVal = last.value;
|
|
541
|
-
}
|
|
556
|
+
if (evalVal === undefined && normalizedPointsObj?.points?.length) {
|
|
557
|
+
evalVal = normalizedPointsObj.points[normalizedPointsObj.points.length - 1].value;
|
|
542
558
|
}
|
|
543
559
|
else if (Array.isArray(evalVal) && evalVal.length > 0) {
|
|
544
|
-
const
|
|
545
|
-
|
|
560
|
+
const visibleVals = evalVal.filter((entry) => !isVisualizationEntrySuppressed(entry));
|
|
561
|
+
if (visibleVals.length > 0) {
|
|
562
|
+
const last = visibleVals[visibleVals.length - 1];
|
|
563
|
+
evalVal = typeof last === 'object' && last !== null && 'value' in last ? last.value : last;
|
|
564
|
+
}
|
|
565
|
+
else {
|
|
566
|
+
evalVal = undefined;
|
|
567
|
+
}
|
|
546
568
|
}
|
|
547
569
|
if (evalVal !== undefined && evalVal !== null) {
|
|
548
570
|
const resolution = resolvePraxisMicroVisualizationTone(evalVal, thresholdsObj.thresholds);
|
|
@@ -556,6 +578,7 @@ function normalizePraxisPresentationVisualization(value) {
|
|
|
556
578
|
}
|
|
557
579
|
if (kind === 'stackedBar') {
|
|
558
580
|
const stacked = normalizeStackedBarDistribution(value, surface);
|
|
581
|
+
const stackedSuppressedCount = Math.max(stacked.suppressedCount ?? 0, countSuppressedEntries(value.points));
|
|
559
582
|
return {
|
|
560
583
|
kind,
|
|
561
584
|
fallbackText,
|
|
@@ -584,14 +607,14 @@ function normalizePraxisPresentationVisualization(value) {
|
|
|
584
607
|
...(normalizeExpression(value.targetLabelExpr, 'targetLabelExpr') ?? {}),
|
|
585
608
|
...(normalizeNumber(value.baseline, 'baseline') ?? {}),
|
|
586
609
|
...(normalizeExpression(value.baselineExpr, 'baselineExpr') ?? {}),
|
|
587
|
-
...(
|
|
610
|
+
...(normalizedPointsObj ?? {}),
|
|
588
611
|
...(normalizeExpression(value.pointsExpr, 'pointsExpr') ?? {}),
|
|
589
612
|
...(stacked.segments ? { segments: stacked.segments } : {}),
|
|
590
613
|
...(normalizeExpression(value.segmentsExpr, 'segmentsExpr') ?? {}),
|
|
591
614
|
...(normalizeThresholds(value.thresholds) ?? {}),
|
|
592
615
|
...(normalizeExpression(value.thresholdsExpr, 'thresholdsExpr') ?? {}),
|
|
593
616
|
...(stacked.items ? { items: stacked.items } : {}),
|
|
594
|
-
...(
|
|
617
|
+
...(stackedSuppressedCount > 0 ? { suppressedCount: stackedSuppressedCount } : {}),
|
|
595
618
|
...(normalizeExpression(value.itemsExpr, 'itemsExpr') ?? {}),
|
|
596
619
|
...(normalizeExpression(value.toneExpr, 'toneExpr') ?? {}),
|
|
597
620
|
...(value.stepLabelWidth !== undefined && (typeof value.stepLabelWidth === 'number' || typeof value.stepLabelWidth === 'string')
|
|
@@ -606,6 +629,9 @@ function normalizePraxisPresentationVisualization(value) {
|
|
|
606
629
|
}
|
|
607
630
|
const normalizedTitle = isTableCell ? undefined : normalizeText$1(value.title);
|
|
608
631
|
const normalizedLegend = typeof value.legend === 'boolean' ? (isTableCell ? false : value.legend) : undefined;
|
|
632
|
+
const suppressedCount = Math.max(resolvePreservedSuppressedCount(value.suppressedCount), countSuppressedEntries(value.points)
|
|
633
|
+
+ countSuppressedEntries(value.items)
|
|
634
|
+
+ countSuppressedEntries(value.segments));
|
|
609
635
|
return {
|
|
610
636
|
kind,
|
|
611
637
|
fallbackText,
|
|
@@ -634,13 +660,14 @@ function normalizePraxisPresentationVisualization(value) {
|
|
|
634
660
|
...(normalizeExpression(value.targetLabelExpr, 'targetLabelExpr') ?? {}),
|
|
635
661
|
...(normalizeNumber(value.baseline, 'baseline') ?? {}),
|
|
636
662
|
...(normalizeExpression(value.baselineExpr, 'baselineExpr') ?? {}),
|
|
637
|
-
...(
|
|
663
|
+
...(normalizedPointsObj ?? {}),
|
|
638
664
|
...(normalizeExpression(value.pointsExpr, 'pointsExpr') ?? {}),
|
|
639
665
|
...(normalizeSegments(value.segments) ?? {}),
|
|
640
666
|
...(normalizeExpression(value.segmentsExpr, 'segmentsExpr') ?? {}),
|
|
641
667
|
...(normalizeThresholds(value.thresholds) ?? {}),
|
|
642
668
|
...(normalizeExpression(value.thresholdsExpr, 'thresholdsExpr') ?? {}),
|
|
643
669
|
...(normalizeItems(value.items) ?? {}),
|
|
670
|
+
...(suppressedCount > 0 ? { suppressedCount } : {}),
|
|
644
671
|
...(normalizeExpression(value.itemsExpr, 'itemsExpr') ?? {}),
|
|
645
672
|
...(normalizeExpression(value.toneExpr, 'toneExpr') ?? {}),
|
|
646
673
|
...(value.stepLabelWidth !== undefined && (typeof value.stepLabelWidth === 'number' || typeof value.stepLabelWidth === 'string')
|
|
@@ -1086,7 +1113,7 @@ function normalizeNumericEntries(value) {
|
|
|
1086
1113
|
const num = toFiniteNumber(item);
|
|
1087
1114
|
return num !== undefined ? { value: num } : null;
|
|
1088
1115
|
}
|
|
1089
|
-
if (!item || typeof item !== 'object') {
|
|
1116
|
+
if (!item || typeof item !== 'object' || isVisualizationEntrySuppressed(item)) {
|
|
1090
1117
|
return null;
|
|
1091
1118
|
}
|
|
1092
1119
|
const num = toFiniteNumber(item.value);
|
|
@@ -1106,7 +1133,7 @@ function normalizeNumericEntries(value) {
|
|
|
1106
1133
|
.filter((item) => !!item);
|
|
1107
1134
|
}
|
|
1108
1135
|
function normalizeVisualizationItem(item) {
|
|
1109
|
-
if (!item || typeof item !== 'object') {
|
|
1136
|
+
if (!item || typeof item !== 'object' || isVisualizationEntrySuppressed(item)) {
|
|
1110
1137
|
return null;
|
|
1111
1138
|
}
|
|
1112
1139
|
const id = normalizeText$1(item.id);
|
|
@@ -1593,7 +1620,15 @@ function resolvePraxisMicroWaterfallSteps(visualization, options = {}) {
|
|
|
1593
1620
|
const rawItems = Array.isArray(visualization.items) && visualization.items.length > 0
|
|
1594
1621
|
? visualization.items
|
|
1595
1622
|
: Array.isArray(visualization.points)
|
|
1596
|
-
? visualization.points.map((pt) => typeof pt === 'number'
|
|
1623
|
+
? visualization.points.map((pt) => typeof pt === 'number'
|
|
1624
|
+
? { value: pt }
|
|
1625
|
+
: {
|
|
1626
|
+
label: pt.label,
|
|
1627
|
+
value: pt.value,
|
|
1628
|
+
tone: pt.tone,
|
|
1629
|
+
...(pt.suppressed !== undefined ? { suppressed: pt.suppressed } : {}),
|
|
1630
|
+
...(pt.privacySuppressed !== undefined ? { privacySuppressed: pt.privacySuppressed } : {}),
|
|
1631
|
+
})
|
|
1597
1632
|
: [];
|
|
1598
1633
|
if (!rawItems.length) {
|
|
1599
1634
|
return [];
|
|
@@ -1604,11 +1639,17 @@ function resolvePraxisMicroWaterfallSteps(visualization, options = {}) {
|
|
|
1604
1639
|
const steps = [];
|
|
1605
1640
|
let running = 0;
|
|
1606
1641
|
let hasFiniteNumeric = false;
|
|
1642
|
+
let hadSuppressedItems = resolvePreservedSuppressedCount(visualization.suppressedCount) > 0;
|
|
1643
|
+
let visibleIncrementCount = 0;
|
|
1607
1644
|
for (let i = 0; i < rawItems.length; i++) {
|
|
1608
1645
|
const raw = rawItems[i];
|
|
1609
1646
|
if (!raw || typeof raw !== 'object') {
|
|
1610
1647
|
continue;
|
|
1611
1648
|
}
|
|
1649
|
+
if (isVisualizationEntrySuppressed(raw)) {
|
|
1650
|
+
hadSuppressedItems = true;
|
|
1651
|
+
continue;
|
|
1652
|
+
}
|
|
1612
1653
|
const rawNumeric = toFiniteNumber(raw.value);
|
|
1613
1654
|
if (rawNumeric !== undefined) {
|
|
1614
1655
|
hasFiniteNumeric = true;
|
|
@@ -1619,6 +1660,9 @@ function resolvePraxisMicroWaterfallSteps(visualization, options = {}) {
|
|
|
1619
1660
|
if (rawNumeric === undefined && role !== 'subtotal' && role !== 'total') {
|
|
1620
1661
|
continue;
|
|
1621
1662
|
}
|
|
1663
|
+
if (role !== 'subtotal' && role !== 'total') {
|
|
1664
|
+
visibleIncrementCount += 1;
|
|
1665
|
+
}
|
|
1622
1666
|
let start = running;
|
|
1623
1667
|
let end = running;
|
|
1624
1668
|
let delta = 0;
|
|
@@ -1631,7 +1675,7 @@ function resolvePraxisMicroWaterfallSteps(visualization, options = {}) {
|
|
|
1631
1675
|
resolvedValue = end;
|
|
1632
1676
|
}
|
|
1633
1677
|
else if (role === 'subtotal' || role === 'total') {
|
|
1634
|
-
const targetEnd = rawNumeric ?? running;
|
|
1678
|
+
const targetEnd = hadSuppressedItems ? running : (rawNumeric ?? running);
|
|
1635
1679
|
start = 0;
|
|
1636
1680
|
end = targetEnd;
|
|
1637
1681
|
delta = targetEnd;
|
|
@@ -1681,7 +1725,7 @@ function resolvePraxisMicroWaterfallSteps(visualization, options = {}) {
|
|
|
1681
1725
|
readout,
|
|
1682
1726
|
});
|
|
1683
1727
|
}
|
|
1684
|
-
if (!hasFiniteNumeric) {
|
|
1728
|
+
if (!hasFiniteNumeric || (hadSuppressedItems && visibleIncrementCount === 0)) {
|
|
1685
1729
|
return [];
|
|
1686
1730
|
}
|
|
1687
1731
|
return steps;
|
|
@@ -1719,7 +1763,11 @@ function renderWaterfallVisualizationHtml(visualization, options) {
|
|
|
1719
1763
|
barsHtml.push(`<rect class="pfx-micro-waterfall__bar" x="${x.toFixed(1)}" y="${clampedY.toFixed(1)}" width="${barW.toFixed(1)}" height="${rectH.toFixed(1)}" rx="1.5" fill="currentColor" data-role="${escapeHtml(step.role)}" data-tone="${escapeHtml(step.tone)}"${styleAttr} />`);
|
|
1720
1764
|
if (i < steps.length - 1) {
|
|
1721
1765
|
const nextX = xPad + (i + 1) * slotW + barOffset;
|
|
1722
|
-
const connY =
|
|
1766
|
+
const connY = step.end > step.start
|
|
1767
|
+
? clampedY
|
|
1768
|
+
: step.end < step.start
|
|
1769
|
+
? clampedY + rectH
|
|
1770
|
+
: Math.min(height - yPad, Math.max(clampedY, Math.min(clampedY + rectH, yEnd)));
|
|
1723
1771
|
connectorsHtml.push(`<line class="pfx-micro-waterfall__connector" x1="${(x + barW).toFixed(1)}" y1="${connY.toFixed(1)}" x2="${nextX.toFixed(1)}" y2="${connY.toFixed(1)}" />`);
|
|
1724
1772
|
}
|
|
1725
1773
|
scrubSlicesHtml.push(`<span class="pfx-micro-waterfall__scrub-slice" data-tone="${escapeHtml(step.tone)}" data-role="${escapeHtml(step.role)}" data-micro-readout="${escapeHtml(step.readout)}" title="${escapeHtml(step.readout)}"></span>`);
|
|
@@ -2156,7 +2204,7 @@ function resolveResourceQuickViewTarget(binding, sourceRecord) {
|
|
|
2156
2204
|
/**
|
|
2157
2205
|
* Verifica se a âncora efêmera de runtime permanece conectada e visível na viewport.
|
|
2158
2206
|
*/
|
|
2159
|
-
function isResourceQuickViewAnchorValid(anchor) {
|
|
2207
|
+
function isResourceQuickViewAnchorValid(anchor, trigger) {
|
|
2160
2208
|
if (!anchor || typeof anchor !== 'object') {
|
|
2161
2209
|
return false;
|
|
2162
2210
|
}
|
|
@@ -2181,10 +2229,11 @@ function isResourceQuickViewAnchorValid(anchor) {
|
|
|
2181
2229
|
if (rect.width === 0 && rect.height === 0) {
|
|
2182
2230
|
return false;
|
|
2183
2231
|
}
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
rect.
|
|
2187
|
-
rect.
|
|
2232
|
+
const edgeTolerance = trigger === 'focus-shortcut' || trigger === 'explicit-button' ? 96 : 0;
|
|
2233
|
+
return (rect.bottom >= -edgeTolerance &&
|
|
2234
|
+
rect.right >= -edgeTolerance &&
|
|
2235
|
+
rect.top <= viewportHeight + edgeTolerance &&
|
|
2236
|
+
rect.left <= viewportWidth + edgeTolerance);
|
|
2188
2237
|
}
|
|
2189
2238
|
if (anchor.kind === 'virtual-rect') {
|
|
2190
2239
|
if (!anchor.anchorKey || !anchor.anchorKey.trim()) {
|
|
@@ -3797,7 +3846,32 @@ class SchemaNormalizationKernel {
|
|
|
3797
3846
|
const rawMode = String(record['mode'] ?? 'flat').trim().toLowerCase();
|
|
3798
3847
|
const mode = rawMode === 'tabs' || rawMode === 'accordion' || rawMode === 'stepper' || rawMode === 'flat'
|
|
3799
3848
|
? rawMode
|
|
3800
|
-
: '
|
|
3849
|
+
: rawMode === 'vertical'
|
|
3850
|
+
? 'flat'
|
|
3851
|
+
: 'flat';
|
|
3852
|
+
const defaultTabId = typeof record['defaultTabId'] === 'string' && record['defaultTabId'].trim()
|
|
3853
|
+
? record['defaultTabId'].trim()
|
|
3854
|
+
: undefined;
|
|
3855
|
+
const rawTabsAppearance = typeof record['tabsAppearance'] === 'string'
|
|
3856
|
+
? record['tabsAppearance'].trim().toLowerCase()
|
|
3857
|
+
: '';
|
|
3858
|
+
const tabsAppearance = rawTabsAppearance === 'pills' ||
|
|
3859
|
+
rawTabsAppearance === 'underline' ||
|
|
3860
|
+
rawTabsAppearance === 'buttons'
|
|
3861
|
+
? rawTabsAppearance
|
|
3862
|
+
: undefined;
|
|
3863
|
+
const accordionMulti = this.parseOptionalBoolean(record['accordionMulti']);
|
|
3864
|
+
const hideSectionHeaderInTabs = this.parseOptionalBoolean(record['hideSectionHeaderInTabs']);
|
|
3865
|
+
const hideSectionHeaderInStepper = this.parseOptionalBoolean(record['hideSectionHeaderInStepper']);
|
|
3866
|
+
const rawStepperInReadMode = typeof record['stepperInReadMode'] === 'string'
|
|
3867
|
+
? record['stepperInReadMode'].trim().toLowerCase()
|
|
3868
|
+
: '';
|
|
3869
|
+
const stepperInReadMode = rawStepperInReadMode === 'presentation' ||
|
|
3870
|
+
rawStepperInReadMode === 'all' ||
|
|
3871
|
+
rawStepperInReadMode === 'none'
|
|
3872
|
+
? rawStepperInReadMode
|
|
3873
|
+
: undefined;
|
|
3874
|
+
const stepperReviewStep = this.parseOptionalBoolean(record['stepperReviewStep']);
|
|
3801
3875
|
const rawSections = Array.isArray(record['sections']) ? record['sections'] : [];
|
|
3802
3876
|
const sections = [];
|
|
3803
3877
|
for (let idx = 0; idx < rawSections.length; idx++) {
|
|
@@ -3813,6 +3887,7 @@ class SchemaNormalizationKernel {
|
|
|
3813
3887
|
const subtitle = typeof item['subtitle'] === 'string' && item['subtitle'].trim() ? item['subtitle'].trim() : undefined;
|
|
3814
3888
|
const icon = typeof item['icon'] === 'string' && item['icon'].trim() ? item['icon'].trim() : undefined;
|
|
3815
3889
|
const groups = this.parseNonBlankStringArray(item['groups']);
|
|
3890
|
+
const optional = this.parseOptionalBoolean(item['optional']);
|
|
3816
3891
|
sections.push({
|
|
3817
3892
|
id,
|
|
3818
3893
|
title,
|
|
@@ -3820,12 +3895,61 @@ class SchemaNormalizationKernel {
|
|
|
3820
3895
|
...(icon ? { icon } : {}),
|
|
3821
3896
|
order: Number.isFinite(orderNum) ? orderNum : idx,
|
|
3822
3897
|
...(groups.length ? { groups } : {}),
|
|
3898
|
+
...(optional !== undefined ? { optional } : {}),
|
|
3823
3899
|
});
|
|
3824
3900
|
}
|
|
3825
3901
|
sections.sort((a, b) => a.order - b.order);
|
|
3902
|
+
const rawSteps = Array.isArray(record['steps']) ? record['steps'] : [];
|
|
3903
|
+
const steps = [];
|
|
3904
|
+
for (const entry of rawSteps) {
|
|
3905
|
+
if (!entry || typeof entry !== 'object' || Array.isArray(entry))
|
|
3906
|
+
continue;
|
|
3907
|
+
const item = entry;
|
|
3908
|
+
const id = String(item['id'] ?? '').trim();
|
|
3909
|
+
const label = String(item['label'] ?? '').trim() || id;
|
|
3910
|
+
const sectionIds = this.parseNonBlankStringArray(item['sectionIds']);
|
|
3911
|
+
if (!id || !sectionIds.length)
|
|
3912
|
+
continue;
|
|
3913
|
+
const description = typeof item['description'] === 'string' && item['description'].trim()
|
|
3914
|
+
? item['description'].trim()
|
|
3915
|
+
: undefined;
|
|
3916
|
+
const icon = typeof item['icon'] === 'string' && item['icon'].trim()
|
|
3917
|
+
? item['icon'].trim()
|
|
3918
|
+
: undefined;
|
|
3919
|
+
const optional = this.parseOptionalBoolean(item['optional']);
|
|
3920
|
+
const disabled = this.parseOptionalBoolean(item['disabled']);
|
|
3921
|
+
const tooltip = typeof item['tooltip'] === 'string' && item['tooltip'].trim()
|
|
3922
|
+
? item['tooltip'].trim()
|
|
3923
|
+
: undefined;
|
|
3924
|
+
const rawBadge = item['badge'];
|
|
3925
|
+
const badge = typeof rawBadge === 'string'
|
|
3926
|
+
? (rawBadge.trim() ? rawBadge.trim() : undefined)
|
|
3927
|
+
: typeof rawBadge === 'number' && Number.isFinite(rawBadge)
|
|
3928
|
+
? rawBadge
|
|
3929
|
+
: undefined;
|
|
3930
|
+
steps.push({
|
|
3931
|
+
id,
|
|
3932
|
+
label,
|
|
3933
|
+
...(description ? { description } : {}),
|
|
3934
|
+
...(icon ? { icon } : {}),
|
|
3935
|
+
sectionIds,
|
|
3936
|
+
...(optional !== undefined ? { optional } : {}),
|
|
3937
|
+
...(badge !== undefined ? { badge } : {}),
|
|
3938
|
+
...(disabled !== undefined ? { disabled } : {}),
|
|
3939
|
+
...(tooltip ? { tooltip } : {}),
|
|
3940
|
+
});
|
|
3941
|
+
}
|
|
3826
3942
|
return {
|
|
3827
3943
|
mode,
|
|
3944
|
+
...(defaultTabId ? { defaultTabId } : {}),
|
|
3945
|
+
...(tabsAppearance ? { tabsAppearance } : {}),
|
|
3946
|
+
...(accordionMulti !== undefined ? { accordionMulti } : {}),
|
|
3947
|
+
...(hideSectionHeaderInTabs !== undefined ? { hideSectionHeaderInTabs } : {}),
|
|
3948
|
+
...(hideSectionHeaderInStepper !== undefined ? { hideSectionHeaderInStepper } : {}),
|
|
3949
|
+
...(stepperInReadMode ? { stepperInReadMode } : {}),
|
|
3950
|
+
...(stepperReviewStep !== undefined ? { stepperReviewStep } : {}),
|
|
3828
3951
|
...(sections.length ? { sections } : {}),
|
|
3952
|
+
...(steps.length ? { steps } : {}),
|
|
3829
3953
|
};
|
|
3830
3954
|
}
|
|
3831
3955
|
parseContextBinding(raw) {
|