@eui/showcase 22.0.0-alpha.39 → 22.0.0-alpha.40
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.
|
@@ -1192,7 +1192,9 @@ class DocPageComponent {
|
|
|
1192
1192
|
}
|
|
1193
1193
|
const apply = (byId) => {
|
|
1194
1194
|
if (byId && !this.isDestroyed) {
|
|
1195
|
-
|
|
1195
|
+
const entry = byId.get(id) ?? null;
|
|
1196
|
+
this.manifestEntry.set(entry);
|
|
1197
|
+
this._applyManifestStatus(entry);
|
|
1196
1198
|
}
|
|
1197
1199
|
};
|
|
1198
1200
|
if (edsManifestCache !== undefined) {
|
|
@@ -1215,6 +1217,42 @@ class DocPageComponent {
|
|
|
1215
1217
|
}
|
|
1216
1218
|
edsManifestLoad.then(apply);
|
|
1217
1219
|
}
|
|
1220
|
+
/**
|
|
1221
|
+
* Derive the status chip + banner from the shared manifest entry (EDS pages). EDS components
|
|
1222
|
+
* carry their lifecycle status in the manifest (`statusColorVariant`), NOT in the legacy
|
|
1223
|
+
* sidebar-link status that `_getComponentStatus` reads — so set the same `stateLabel` /
|
|
1224
|
+
* `stateTypeClass` / flags the legacy switch produces, keyed off the manifest color variant.
|
|
1225
|
+
*/
|
|
1226
|
+
_applyManifestStatus(entry) {
|
|
1227
|
+
if (!entry) {
|
|
1228
|
+
return;
|
|
1229
|
+
}
|
|
1230
|
+
switch (entry.statusColorVariant) {
|
|
1231
|
+
case 'success':
|
|
1232
|
+
this.stateLabel = 'ACTIVE';
|
|
1233
|
+
this.stateTypeClass = 'success';
|
|
1234
|
+
break;
|
|
1235
|
+
case 'warning':
|
|
1236
|
+
this.stateLabel = 'will be removed in eUI 21';
|
|
1237
|
+
this.stateTypeClass = 'warning';
|
|
1238
|
+
this.isDeprecatedInput.set(true);
|
|
1239
|
+
break;
|
|
1240
|
+
case 'danger':
|
|
1241
|
+
this.stateLabel = 'DEMO ONLY';
|
|
1242
|
+
this.stateTypeClass = 'danger';
|
|
1243
|
+
this.isLegacyInput.set(true);
|
|
1244
|
+
this.isDemoComponentOnlyInput.set(true);
|
|
1245
|
+
break;
|
|
1246
|
+
case 'info':
|
|
1247
|
+
this.stateLabel = 'NOT READY';
|
|
1248
|
+
this.stateTypeClass = 'accent';
|
|
1249
|
+
this.isNotReadyInput.set(true);
|
|
1250
|
+
break;
|
|
1251
|
+
default:
|
|
1252
|
+
break;
|
|
1253
|
+
}
|
|
1254
|
+
this.cdr.markForCheck();
|
|
1255
|
+
}
|
|
1218
1256
|
ngOnInit() {
|
|
1219
1257
|
// Sync input signals to writable signals
|
|
1220
1258
|
if (this.isNotReady())
|