@praxisui/core 10.0.0-rc.57 → 10.0.0-rc.58
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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
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.58",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 4,
|
|
@@ -1202,7 +1202,7 @@ function renderRadialVisualizationHtml(visualization, options) {
|
|
|
1202
1202
|
? Math.max(0, Math.min(100, (targetVal / total) * 100))
|
|
1203
1203
|
: null;
|
|
1204
1204
|
const targetArcHtml = targetPct !== null
|
|
1205
|
-
? `<circle class="pfx-micro-radial-svg__target-arc" cx="18" cy="18" r="13.
|
|
1205
|
+
? `<circle class="pfx-micro-radial-svg__target-arc" cx="18" cy="18" r="13.8" pathLength="100" stroke-dasharray="${targetPct.toFixed(1)}, 100" transform="rotate(-90 18 18)" />`
|
|
1206
1206
|
: '';
|
|
1207
1207
|
const digitTierAttr = radialNumStr.length >= 4
|
|
1208
1208
|
? ' data-digits="4"'
|
|
@@ -1234,10 +1234,10 @@ function renderRadialVisualizationHtml(visualization, options) {
|
|
|
1234
1234
|
</linearGradient>
|
|
1235
1235
|
</defs>
|
|
1236
1236
|
<circle class="pfx-micro-radial-svg__bezel" cx="18" cy="18" r="17" />
|
|
1237
|
-
<circle class="pfx-micro-radial-svg__track" cx="18" cy="18" r="13.
|
|
1237
|
+
<circle class="pfx-micro-radial-svg__track" cx="18" cy="18" r="13.8" pathLength="100" />
|
|
1238
1238
|
${targetArcHtml}
|
|
1239
|
-
<circle class="pfx-micro-radial-svg__bar" cx="18" cy="18" r="13.
|
|
1240
|
-
<circle class="pfx-micro-radial-svg__medallion" cx="18" cy="18" r="9
|
|
1239
|
+
<circle class="pfx-micro-radial-svg__bar" cx="18" cy="18" r="13.8" pathLength="100"${isZero ? ' data-zero="true"' : ''} stroke="url(#${escapeHtml(gradId)})" stroke-dasharray="${dashArray}" transform="rotate(-90 18 18)" />
|
|
1240
|
+
<circle class="pfx-micro-radial-svg__medallion" cx="18" cy="18" r="10.9" />
|
|
1241
1241
|
${svgText}
|
|
1242
1242
|
</svg>
|
|
1243
1243
|
${externalText}
|
|
@@ -1402,15 +1402,8 @@ function renderLineVisualizationHtml(visualization, options) {
|
|
|
1402
1402
|
${leftHtml}
|
|
1403
1403
|
<span class="pfx-micro-viz pfx-micro-viz__line" data-tone="${escapeHtml(tone)}" role="img" aria-label="${escapeHtml(visualization.ariaLabel ?? visualization.fallbackText)}">
|
|
1404
1404
|
<svg class="pfx-micro-line__svg" viewBox="0 0 100 30">
|
|
1405
|
-
<defs>
|
|
1406
|
-
<linearGradient id="${escapeHtml(glowGradId)}" x1="0%" y1="0%" x2="0%" y2="100%">
|
|
1407
|
-
<stop offset="0%" stop-color="currentColor" stop-opacity="0.16" />
|
|
1408
|
-
<stop offset="100%" stop-color="currentColor" stop-opacity="0" />
|
|
1409
|
-
</linearGradient>
|
|
1410
|
-
</defs>
|
|
1411
1405
|
${refLineHtml}
|
|
1412
|
-
<path class="pfx-micro-
|
|
1413
|
-
<path class="pfx-micro-line__path" d="${pathD}" fill="none" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round" />
|
|
1406
|
+
<path class="pfx-micro-line__path" d="${pathD}" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" />
|
|
1414
1407
|
${endpointHaloHtml}
|
|
1415
1408
|
${circlesHtml}
|
|
1416
1409
|
</svg>
|
|
@@ -1795,7 +1788,7 @@ function renderWaterfallVisualizationHtml(visualization, options) {
|
|
|
1795
1788
|
<span class="pfx-micro-viz-container">
|
|
1796
1789
|
${startSummaryHtml}
|
|
1797
1790
|
<span class="pfx-micro-viz pfx-micro-viz__waterfall" data-tone="${escapeHtml(fallbackTone)}" role="img" aria-label="${escapeHtml(aria)}">
|
|
1798
|
-
<svg class="pfx-micro-waterfall__svg" viewBox="0 0 ${width} ${height}">
|
|
1791
|
+
<svg class="pfx-micro-waterfall__svg" viewBox="0 0 ${width} ${height}" preserveAspectRatio="none">
|
|
1799
1792
|
${baselineHtml}
|
|
1800
1793
|
${connectorsHtml.join('')}
|
|
1801
1794
|
${barsHtml.join('')}
|
|
@@ -5167,20 +5160,24 @@ function resolveSchemaBooleanFormatFromFieldDefinition(def) {
|
|
|
5167
5160
|
return explicit;
|
|
5168
5161
|
const trueLabel = firstNonEmptyString(def.trueLabel) ??
|
|
5169
5162
|
firstNonEmptyString(def.labelTrue) ??
|
|
5163
|
+
firstNonEmptyString(def.presentation?.labelTrue) ??
|
|
5170
5164
|
firstNonEmptyString(def.extraProperties?.trueLabel) ??
|
|
5171
5165
|
firstNonEmptyString(def.extraProperties?.labelTrue);
|
|
5172
5166
|
const falseLabel = firstNonEmptyString(def.falseLabel) ??
|
|
5173
5167
|
firstNonEmptyString(def.labelFalse) ??
|
|
5168
|
+
firstNonEmptyString(def.presentation?.labelFalse) ??
|
|
5174
5169
|
firstNonEmptyString(def.extraProperties?.falseLabel) ??
|
|
5175
5170
|
firstNonEmptyString(def.extraProperties?.labelFalse);
|
|
5176
|
-
if (trueLabel
|
|
5177
|
-
const
|
|
5178
|
-
const
|
|
5171
|
+
if (trueLabel || falseLabel) {
|
|
5172
|
+
const effectiveTrue = trueLabel || 'Sim';
|
|
5173
|
+
const effectiveFalse = falseLabel || 'Não';
|
|
5174
|
+
const tNorm = normalizePresentationToken(effectiveTrue);
|
|
5175
|
+
const fNorm = normalizePresentationToken(effectiveFalse);
|
|
5179
5176
|
if (tNorm === 'ativo' && fNorm === 'inativo')
|
|
5180
5177
|
return 'active-inactive';
|
|
5181
5178
|
if (tNorm === 'sim' && (fNorm === 'nao' || fNorm === 'não'))
|
|
5182
5179
|
return 'yes-no';
|
|
5183
|
-
return `custom|${
|
|
5180
|
+
return `custom|${effectiveTrue}|${effectiveFalse}`;
|
|
5184
5181
|
}
|
|
5185
5182
|
const name = normalizePresentationToken(def.name);
|
|
5186
5183
|
if (name === 'ativo' || name === 'active' || name.endsWith('ativo')) {
|
|
@@ -5418,7 +5415,29 @@ function resolveRendererFromFieldPresentation(def) {
|
|
|
5418
5415
|
},
|
|
5419
5416
|
};
|
|
5420
5417
|
}
|
|
5421
|
-
if (presenter === '
|
|
5418
|
+
if (presenter === 'progress') {
|
|
5419
|
+
const valueExpr = `= row.${def.name.replace(/\./g, '?.')}`;
|
|
5420
|
+
return {
|
|
5421
|
+
type: 'progress',
|
|
5422
|
+
progress: {
|
|
5423
|
+
valueExpr,
|
|
5424
|
+
showLabel: true,
|
|
5425
|
+
...(color ? { color } : {}),
|
|
5426
|
+
},
|
|
5427
|
+
};
|
|
5428
|
+
}
|
|
5429
|
+
if (presenter === 'rating') {
|
|
5430
|
+
const valueExpr = `= row.${def.name.replace(/\./g, '?.')}`;
|
|
5431
|
+
return {
|
|
5432
|
+
type: 'rating',
|
|
5433
|
+
rating: {
|
|
5434
|
+
valueExpr,
|
|
5435
|
+
max: 5,
|
|
5436
|
+
...(color ? { color } : {}),
|
|
5437
|
+
},
|
|
5438
|
+
};
|
|
5439
|
+
}
|
|
5440
|
+
if (presenter === 'iconvalue' || presenter === 'text' || !presenter) {
|
|
5422
5441
|
const rendererIcon = icon || firstNonEmptyString(def.icon);
|
|
5423
5442
|
const affixes = resolveSemanticPresentationAffixes(presentation);
|
|
5424
5443
|
const hasAffixes = !!(affixes.prefix || affixes.suffix);
|
|
@@ -5430,6 +5449,7 @@ function resolveRendererFromFieldPresentation(def) {
|
|
|
5430
5449
|
icon: {
|
|
5431
5450
|
...(!hasAffixes && rendererIcon ? { name: rendererIcon } : {}),
|
|
5432
5451
|
textField: def.name,
|
|
5452
|
+
...(color ? { color } : {}),
|
|
5433
5453
|
...(tooltipText ? { ariaLabel: tooltipText } : {}),
|
|
5434
5454
|
...affixes,
|
|
5435
5455
|
},
|
|
@@ -398,6 +398,22 @@ class EnterpriseRuntimeContextService {
|
|
|
398
398
|
invalidate() {
|
|
399
399
|
this.invalidateContext();
|
|
400
400
|
}
|
|
401
|
+
/** Synchronizes a host-confirmed runtime context snapshot without issuing a duplicate GET. */
|
|
402
|
+
adoptConfirmedContext(context) {
|
|
403
|
+
this.contextRevision += 1;
|
|
404
|
+
this.loadPromise = null;
|
|
405
|
+
if (!context) {
|
|
406
|
+
if (this.contextSubject.value !== null) {
|
|
407
|
+
this.contextSubject.next(null);
|
|
408
|
+
}
|
|
409
|
+
return null;
|
|
410
|
+
}
|
|
411
|
+
const normalized = this.normalizeContext(context);
|
|
412
|
+
if (JSON.stringify(this.contextSubject.value) !== JSON.stringify(normalized)) {
|
|
413
|
+
this.contextSubject.next(normalized);
|
|
414
|
+
}
|
|
415
|
+
return normalized;
|
|
416
|
+
}
|
|
401
417
|
/** Independent host tenant discovery; it never selects the runtime context. */
|
|
402
418
|
tenants() {
|
|
403
419
|
return this.getRuntimeSurface('tenants');
|
|
@@ -5099,6 +5115,12 @@ function mapFieldDefinitionToMetadata(field) {
|
|
|
5099
5115
|
}
|
|
5100
5116
|
if (field.presentation) {
|
|
5101
5117
|
metadata.presentation = { ...field.presentation };
|
|
5118
|
+
if (field.presentation.labelTrue && field.trueLabel === undefined) {
|
|
5119
|
+
metadata.trueLabel = field.presentation.labelTrue;
|
|
5120
|
+
}
|
|
5121
|
+
if (field.presentation.labelFalse && field.falseLabel === undefined) {
|
|
5122
|
+
metadata.falseLabel = field.presentation.labelFalse;
|
|
5123
|
+
}
|
|
5102
5124
|
}
|
|
5103
5125
|
if (field.array) {
|
|
5104
5126
|
const arrayConfig = { ...field.array };
|
|
@@ -10780,7 +10802,7 @@ function renderRadialVisualizationHtml(visualization, options) {
|
|
|
10780
10802
|
? Math.max(0, Math.min(100, (targetVal / total) * 100))
|
|
10781
10803
|
: null;
|
|
10782
10804
|
const targetArcHtml = targetPct !== null
|
|
10783
|
-
? `<circle class="pfx-micro-radial-svg__target-arc" cx="18" cy="18" r="13.
|
|
10805
|
+
? `<circle class="pfx-micro-radial-svg__target-arc" cx="18" cy="18" r="13.8" pathLength="100" stroke-dasharray="${targetPct.toFixed(1)}, 100" transform="rotate(-90 18 18)" />`
|
|
10784
10806
|
: '';
|
|
10785
10807
|
const digitTierAttr = radialNumStr.length >= 4
|
|
10786
10808
|
? ' data-digits="4"'
|
|
@@ -10812,10 +10834,10 @@ function renderRadialVisualizationHtml(visualization, options) {
|
|
|
10812
10834
|
</linearGradient>
|
|
10813
10835
|
</defs>
|
|
10814
10836
|
<circle class="pfx-micro-radial-svg__bezel" cx="18" cy="18" r="17" />
|
|
10815
|
-
<circle class="pfx-micro-radial-svg__track" cx="18" cy="18" r="13.
|
|
10837
|
+
<circle class="pfx-micro-radial-svg__track" cx="18" cy="18" r="13.8" pathLength="100" />
|
|
10816
10838
|
${targetArcHtml}
|
|
10817
|
-
<circle class="pfx-micro-radial-svg__bar" cx="18" cy="18" r="13.
|
|
10818
|
-
<circle class="pfx-micro-radial-svg__medallion" cx="18" cy="18" r="9
|
|
10839
|
+
<circle class="pfx-micro-radial-svg__bar" cx="18" cy="18" r="13.8" pathLength="100"${isZero ? ' data-zero="true"' : ''} stroke="url(#${escapeHtml$1(gradId)})" stroke-dasharray="${dashArray}" transform="rotate(-90 18 18)" />
|
|
10840
|
+
<circle class="pfx-micro-radial-svg__medallion" cx="18" cy="18" r="10.9" />
|
|
10819
10841
|
${svgText}
|
|
10820
10842
|
</svg>
|
|
10821
10843
|
${externalText}
|
|
@@ -10980,15 +11002,8 @@ function renderLineVisualizationHtml(visualization, options) {
|
|
|
10980
11002
|
${leftHtml}
|
|
10981
11003
|
<span class="pfx-micro-viz pfx-micro-viz__line" data-tone="${escapeHtml$1(tone)}" role="img" aria-label="${escapeHtml$1(visualization.ariaLabel ?? visualization.fallbackText)}">
|
|
10982
11004
|
<svg class="pfx-micro-line__svg" viewBox="0 0 100 30">
|
|
10983
|
-
<defs>
|
|
10984
|
-
<linearGradient id="${escapeHtml$1(glowGradId)}" x1="0%" y1="0%" x2="0%" y2="100%">
|
|
10985
|
-
<stop offset="0%" stop-color="currentColor" stop-opacity="0.16" />
|
|
10986
|
-
<stop offset="100%" stop-color="currentColor" stop-opacity="0" />
|
|
10987
|
-
</linearGradient>
|
|
10988
|
-
</defs>
|
|
10989
11005
|
${refLineHtml}
|
|
10990
|
-
<path class="pfx-micro-
|
|
10991
|
-
<path class="pfx-micro-line__path" d="${pathD}" fill="none" stroke="currentColor" stroke-width="2.1" stroke-linecap="round" stroke-linejoin="round" />
|
|
11006
|
+
<path class="pfx-micro-line__path" d="${pathD}" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" />
|
|
10992
11007
|
${endpointHaloHtml}
|
|
10993
11008
|
${circlesHtml}
|
|
10994
11009
|
</svg>
|
|
@@ -11373,7 +11388,7 @@ function renderWaterfallVisualizationHtml(visualization, options) {
|
|
|
11373
11388
|
<span class="pfx-micro-viz-container">
|
|
11374
11389
|
${startSummaryHtml}
|
|
11375
11390
|
<span class="pfx-micro-viz pfx-micro-viz__waterfall" data-tone="${escapeHtml$1(fallbackTone)}" role="img" aria-label="${escapeHtml$1(aria)}">
|
|
11376
|
-
<svg class="pfx-micro-waterfall__svg" viewBox="0 0 ${width} ${height}">
|
|
11391
|
+
<svg class="pfx-micro-waterfall__svg" viewBox="0 0 ${width} ${height}" preserveAspectRatio="none">
|
|
11377
11392
|
${baselineHtml}
|
|
11378
11393
|
${connectorsHtml.join('')}
|
|
11379
11394
|
${barsHtml.join('')}
|
|
@@ -15606,7 +15621,9 @@ class PraxisDecisionInspectorService {
|
|
|
15606
15621
|
resourcePathByKeyCache = new Map();
|
|
15607
15622
|
inFlightResourceKeyByPath = new Map();
|
|
15608
15623
|
catalogCache = new Map();
|
|
15624
|
+
enrichedCatalogCache = new Map();
|
|
15609
15625
|
inFlightCatalogByKey = new Map();
|
|
15626
|
+
schemaFieldsCache = new Map();
|
|
15610
15627
|
capabilitiesCache = new Map();
|
|
15611
15628
|
inFlightCapabilitiesByKey = new Map();
|
|
15612
15629
|
lastContextSignature = '';
|
|
@@ -15629,7 +15646,9 @@ class PraxisDecisionInspectorService {
|
|
|
15629
15646
|
this.resourcePathByKeyCache.clear();
|
|
15630
15647
|
this.inFlightResourceKeyByPath.clear();
|
|
15631
15648
|
this.catalogCache.clear();
|
|
15649
|
+
this.enrichedCatalogCache.clear();
|
|
15632
15650
|
this.inFlightCatalogByKey.clear();
|
|
15651
|
+
this.schemaFieldsCache.clear();
|
|
15633
15652
|
this.capabilitiesCache.clear();
|
|
15634
15653
|
this.inFlightCapabilitiesByKey.clear();
|
|
15635
15654
|
}
|
|
@@ -15706,6 +15725,18 @@ class PraxisDecisionInspectorService {
|
|
|
15706
15725
|
return null;
|
|
15707
15726
|
}
|
|
15708
15727
|
const cacheKey = `${this.syncContextSignature()}::${options.endpointKey ?? 'default'}::${resolvedResourceKey}`;
|
|
15728
|
+
const authorities = this.runtimeContext?.effectiveContext?.authorities ?? null;
|
|
15729
|
+
const authoritiesSig = Array.isArray(authorities) ? [...authorities].sort().join(',') : '';
|
|
15730
|
+
const enrichedCacheKey = `${cacheKey}::${authoritiesSig}`;
|
|
15731
|
+
if (!options.forceRefresh && options.includeFieldSchemas) {
|
|
15732
|
+
const cachedEnriched = this.enrichedCatalogCache.get(enrichedCacheKey);
|
|
15733
|
+
if (cachedEnriched && cachedEnriched.expiresAt > Date.now()) {
|
|
15734
|
+
return cachedEnriched.value;
|
|
15735
|
+
}
|
|
15736
|
+
}
|
|
15737
|
+
const schemaFieldsPromise = options.includeFieldSchemas
|
|
15738
|
+
? this.tryLoadResourceSchemaFields(options.resourcePath ?? resolvedResourceKey, options, resolvedResourceKey, Boolean(options.forceRefresh))
|
|
15739
|
+
: Promise.resolve([]);
|
|
15709
15740
|
let baseCatalog = null;
|
|
15710
15741
|
if (!options.forceRefresh) {
|
|
15711
15742
|
const cached = this.catalogCache.get(cacheKey);
|
|
@@ -15736,9 +15767,8 @@ class PraxisDecisionInspectorService {
|
|
|
15736
15767
|
baseCatalog = await fetchPromise;
|
|
15737
15768
|
}
|
|
15738
15769
|
}
|
|
15739
|
-
const authorities = this.runtimeContext?.effectiveContext?.authorities ?? null;
|
|
15740
15770
|
if (options.includeFieldSchemas) {
|
|
15741
|
-
const schemaFields = await
|
|
15771
|
+
const schemaFields = await schemaFieldsPromise;
|
|
15742
15772
|
if (schemaFields.length > 0) {
|
|
15743
15773
|
const mergedFieldLabels = {};
|
|
15744
15774
|
for (const field of schemaFields) {
|
|
@@ -15756,7 +15786,7 @@ class PraxisDecisionInspectorService {
|
|
|
15756
15786
|
}
|
|
15757
15787
|
}
|
|
15758
15788
|
}
|
|
15759
|
-
|
|
15789
|
+
const enriched = {
|
|
15760
15790
|
...baseCatalog,
|
|
15761
15791
|
ruleSets: enrichRuleSetsWithFieldSchemas(baseCatalog.ruleSets, schemaFields),
|
|
15762
15792
|
governance: enrichGovernanceItemsWithFieldSchemas(baseCatalog.governance ?? [], schemaFields, baseCatalog.resourceKey, authorities),
|
|
@@ -15764,6 +15794,8 @@ class PraxisDecisionInspectorService {
|
|
|
15764
15794
|
? { fieldLabels: mergedFieldLabels }
|
|
15765
15795
|
: {}),
|
|
15766
15796
|
};
|
|
15797
|
+
this.storeBoundedCache(this.enrichedCatalogCache, enrichedCacheKey, enriched);
|
|
15798
|
+
return enriched;
|
|
15767
15799
|
}
|
|
15768
15800
|
}
|
|
15769
15801
|
if (baseCatalog.governance?.length) {
|
|
@@ -16040,19 +16072,59 @@ class PraxisDecisionInspectorService {
|
|
|
16040
16072
|
this.inFlightCapabilitiesByKey.set(cacheKey, requestPromise);
|
|
16041
16073
|
return requestPromise;
|
|
16042
16074
|
}
|
|
16043
|
-
async tryLoadResourceSchemaFields(resourcePathOrKey, options) {
|
|
16075
|
+
async tryLoadResourceSchemaFields(resourcePathOrKey, options, resolvedResourceKey, forceRefresh = false) {
|
|
16044
16076
|
const discovery = this.getDiscovery();
|
|
16045
16077
|
if (!discovery ||
|
|
16046
16078
|
!discovery.canResolveSchemas(options) ||
|
|
16047
16079
|
typeof discovery.getResourceSchemaFields !== 'function') {
|
|
16048
16080
|
return [];
|
|
16049
16081
|
}
|
|
16082
|
+
const endpointPrefix = `${this.syncContextSignature()}::${options.endpointKey ?? 'default'}`;
|
|
16083
|
+
const cacheKey = `${endpointPrefix}::${resolvedResourceKey || resourcePathOrKey}`;
|
|
16084
|
+
if (!forceRefresh) {
|
|
16085
|
+
const cached = this.schemaFieldsCache.get(cacheKey);
|
|
16086
|
+
if (cached && cached.expiresAt > Date.now()) {
|
|
16087
|
+
return cached.value;
|
|
16088
|
+
}
|
|
16089
|
+
}
|
|
16090
|
+
const rawTarget = this.cleanText(resourcePathOrKey) ?? '';
|
|
16091
|
+
let candidatePath = rawTarget.includes('/')
|
|
16092
|
+
? this.normalizeCapabilityBasePath(rawTarget)
|
|
16093
|
+
: (this.resourcePathByKeyCache.get(cacheKey) ?? '');
|
|
16094
|
+
if (candidatePath && !candidatePath.startsWith('/')) {
|
|
16095
|
+
candidatePath = `/${candidatePath}`;
|
|
16096
|
+
}
|
|
16097
|
+
if (candidatePath.startsWith('/') && typeof discovery.getSchemaFieldsByUrl === 'function') {
|
|
16098
|
+
const candidateFilterPaths = candidatePath.startsWith('/api/')
|
|
16099
|
+
? [candidatePath]
|
|
16100
|
+
: [candidatePath, `/api${candidatePath}`];
|
|
16101
|
+
for (const filterBasePath of candidateFilterPaths) {
|
|
16102
|
+
try {
|
|
16103
|
+
const directUrl = `/schemas/filtered?path=${encodeURIComponent(`${filterBasePath}/filter`)}&operation=post&schemaType=response`;
|
|
16104
|
+
const directFields = await firstValueFrom(discovery.getSchemaFieldsByUrl(directUrl, {
|
|
16105
|
+
endpointKey: options.endpointKey,
|
|
16106
|
+
apiUrlEntry: options.apiUrlEntry,
|
|
16107
|
+
}));
|
|
16108
|
+
if (Array.isArray(directFields) && directFields.length > 0) {
|
|
16109
|
+
this.storeBoundedCache(this.schemaFieldsCache, cacheKey, directFields);
|
|
16110
|
+
return directFields;
|
|
16111
|
+
}
|
|
16112
|
+
}
|
|
16113
|
+
catch {
|
|
16114
|
+
// Try next normalized candidate path before falling back to catalog
|
|
16115
|
+
}
|
|
16116
|
+
}
|
|
16117
|
+
}
|
|
16050
16118
|
try {
|
|
16051
16119
|
const fields = await firstValueFrom(discovery.getResourceSchemaFields(resourcePathOrKey, {
|
|
16052
16120
|
endpointKey: options.endpointKey,
|
|
16053
16121
|
apiUrlEntry: options.apiUrlEntry,
|
|
16054
16122
|
}));
|
|
16055
|
-
|
|
16123
|
+
if (Array.isArray(fields) && fields.length > 0) {
|
|
16124
|
+
this.storeBoundedCache(this.schemaFieldsCache, cacheKey, fields);
|
|
16125
|
+
return fields;
|
|
16126
|
+
}
|
|
16127
|
+
return [];
|
|
16056
16128
|
}
|
|
16057
16129
|
catch {
|
|
16058
16130
|
return [];
|
|
@@ -26169,20 +26241,24 @@ function resolveSchemaBooleanFormatFromFieldDefinition(def) {
|
|
|
26169
26241
|
return explicit;
|
|
26170
26242
|
const trueLabel = firstNonEmptyString(def.trueLabel) ??
|
|
26171
26243
|
firstNonEmptyString(def.labelTrue) ??
|
|
26244
|
+
firstNonEmptyString(def.presentation?.labelTrue) ??
|
|
26172
26245
|
firstNonEmptyString(def.extraProperties?.trueLabel) ??
|
|
26173
26246
|
firstNonEmptyString(def.extraProperties?.labelTrue);
|
|
26174
26247
|
const falseLabel = firstNonEmptyString(def.falseLabel) ??
|
|
26175
26248
|
firstNonEmptyString(def.labelFalse) ??
|
|
26249
|
+
firstNonEmptyString(def.presentation?.labelFalse) ??
|
|
26176
26250
|
firstNonEmptyString(def.extraProperties?.falseLabel) ??
|
|
26177
26251
|
firstNonEmptyString(def.extraProperties?.labelFalse);
|
|
26178
|
-
if (trueLabel
|
|
26179
|
-
const
|
|
26180
|
-
const
|
|
26252
|
+
if (trueLabel || falseLabel) {
|
|
26253
|
+
const effectiveTrue = trueLabel || 'Sim';
|
|
26254
|
+
const effectiveFalse = falseLabel || 'Não';
|
|
26255
|
+
const tNorm = normalizePresentationToken(effectiveTrue);
|
|
26256
|
+
const fNorm = normalizePresentationToken(effectiveFalse);
|
|
26181
26257
|
if (tNorm === 'ativo' && fNorm === 'inativo')
|
|
26182
26258
|
return 'active-inactive';
|
|
26183
26259
|
if (tNorm === 'sim' && (fNorm === 'nao' || fNorm === 'não'))
|
|
26184
26260
|
return 'yes-no';
|
|
26185
|
-
return `custom|${
|
|
26261
|
+
return `custom|${effectiveTrue}|${effectiveFalse}`;
|
|
26186
26262
|
}
|
|
26187
26263
|
const name = normalizePresentationToken(def.name);
|
|
26188
26264
|
if (name === 'ativo' || name === 'active' || name.endsWith('ativo')) {
|
|
@@ -26420,7 +26496,29 @@ function resolveRendererFromFieldPresentation(def) {
|
|
|
26420
26496
|
},
|
|
26421
26497
|
};
|
|
26422
26498
|
}
|
|
26423
|
-
if (presenter === '
|
|
26499
|
+
if (presenter === 'progress') {
|
|
26500
|
+
const valueExpr = `= row.${def.name.replace(/\./g, '?.')}`;
|
|
26501
|
+
return {
|
|
26502
|
+
type: 'progress',
|
|
26503
|
+
progress: {
|
|
26504
|
+
valueExpr,
|
|
26505
|
+
showLabel: true,
|
|
26506
|
+
...(color ? { color } : {}),
|
|
26507
|
+
},
|
|
26508
|
+
};
|
|
26509
|
+
}
|
|
26510
|
+
if (presenter === 'rating') {
|
|
26511
|
+
const valueExpr = `= row.${def.name.replace(/\./g, '?.')}`;
|
|
26512
|
+
return {
|
|
26513
|
+
type: 'rating',
|
|
26514
|
+
rating: {
|
|
26515
|
+
valueExpr,
|
|
26516
|
+
max: 5,
|
|
26517
|
+
...(color ? { color } : {}),
|
|
26518
|
+
},
|
|
26519
|
+
};
|
|
26520
|
+
}
|
|
26521
|
+
if (presenter === 'iconvalue' || presenter === 'text' || !presenter) {
|
|
26424
26522
|
const rendererIcon = icon || firstNonEmptyString(def.icon);
|
|
26425
26523
|
const affixes = resolveSemanticPresentationAffixes(presentation);
|
|
26426
26524
|
const hasAffixes = !!(affixes.prefix || affixes.suffix);
|
|
@@ -26432,6 +26530,7 @@ function resolveRendererFromFieldPresentation(def) {
|
|
|
26432
26530
|
icon: {
|
|
26433
26531
|
...(!hasAffixes && rendererIcon ? { name: rendererIcon } : {}),
|
|
26434
26532
|
textField: def.name,
|
|
26533
|
+
...(color ? { color } : {}),
|
|
26435
26534
|
...(tooltipText ? { ariaLabel: tooltipText } : {}),
|
|
26436
26535
|
...affixes,
|
|
26437
26536
|
},
|
|
@@ -37618,6 +37717,8 @@ const SERVER_OWNED_FIELD_SEMANTIC_KEYS = [
|
|
|
37618
37717
|
'readOnly',
|
|
37619
37718
|
// normalizeFieldConstraints publishes this spelling to runtime consumers.
|
|
37620
37719
|
'readonly',
|
|
37720
|
+
'conditionalReadOnly',
|
|
37721
|
+
'conditionalDisplay',
|
|
37621
37722
|
'editable',
|
|
37622
37723
|
'fieldAccess',
|
|
37623
37724
|
'label',
|
|
@@ -37752,6 +37853,7 @@ function applyLocalCustomizations$1(base, local) {
|
|
|
37752
37853
|
optionValueKey: base.optionValueKey,
|
|
37753
37854
|
colSpan: base.colSpan ?? local.colSpan,
|
|
37754
37855
|
conditionalReadOnly: base.conditionalReadOnly,
|
|
37856
|
+
conditionalDisplay: base.conditionalDisplay,
|
|
37755
37857
|
draftCleared: base.draftCleared,
|
|
37756
37858
|
contextBinding: base.contextBinding,
|
|
37757
37859
|
resourceState: base.resourceState,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/core",
|
|
3
|
-
"version": "10.0.0-rc.
|
|
3
|
+
"version": "10.0.0-rc.58",
|
|
4
4
|
"description": "Core library for Praxis UI Workspace: types, tokens, services and utilities shared across @praxisui/* packages.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/cdk": "^21.0.0",
|
package/types/praxisui-core.d.ts
CHANGED
|
@@ -15730,7 +15730,9 @@ declare class PraxisDecisionInspectorService {
|
|
|
15730
15730
|
private readonly resourcePathByKeyCache;
|
|
15731
15731
|
private readonly inFlightResourceKeyByPath;
|
|
15732
15732
|
private readonly catalogCache;
|
|
15733
|
+
private readonly enrichedCatalogCache;
|
|
15733
15734
|
private readonly inFlightCatalogByKey;
|
|
15735
|
+
private readonly schemaFieldsCache;
|
|
15734
15736
|
private readonly capabilitiesCache;
|
|
15735
15737
|
private readonly inFlightCapabilitiesByKey;
|
|
15736
15738
|
private lastContextSignature;
|
|
@@ -15867,6 +15869,8 @@ declare class EnterpriseRuntimeContextService {
|
|
|
15867
15869
|
ready(): Promise<EnterpriseRuntimeContext | null>;
|
|
15868
15870
|
refresh(): Promise<EnterpriseRuntimeContext | null>;
|
|
15869
15871
|
invalidate(): void;
|
|
15872
|
+
/** Synchronizes a host-confirmed runtime context snapshot without issuing a duplicate GET. */
|
|
15873
|
+
adoptConfirmedContext(context: EnterpriseRuntimeContext | null): EnterpriseRuntimeContext | null;
|
|
15870
15874
|
/** Independent host tenant discovery; it never selects the runtime context. */
|
|
15871
15875
|
tenants(): Promise<EnterpriseRuntimeTenantsResponse>;
|
|
15872
15876
|
choices(options?: {
|